Exemplo n.º 1
0
        public void ClickLink()
        {
            NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebsite());
            LinkHelper.ClickLink(By.LinkText("File a Bug"));

            TextBoxHelper.TypeInTextBox(By.Id("Bugzilla_login"), ObjectRepository.Config.GetUsername());
            TextBoxHelper.TypeInTextBox(By.Id("Bugzilla_password"), ObjectRepository.Config.GetPassword());
            //TextBoxHelper.ClearTextBox(By.Id("Bugzilla_login"));
            //TextBoxHelper.ClearTextBox(By.Id("Bugzilla_password"));

            Console.WriteLine(CheckBoxHelper.IsCheckBoxChecked(By.Id("Bugzilla_restrictlogin")));
            CheckBoxHelper.CheckedCheckBox(By.Id("Bugzilla_restrictlogin"));
            Console.WriteLine(CheckBoxHelper.IsCheckBoxChecked(By.Id("Bugzilla_restrictlogin")));


            Console.WriteLine("Enabled : {0}", ButtonHelper.IsButtonEnabled(By.Id("log_in")));
            Console.WriteLine("Text : {0}", ButtonHelper.GetButtonText(By.Id("log_in")));
            ButtonHelper.ClickButton(By.Id("log_in"));

            GenericHelper.WaitForWebElement(By.Name("component"), TimeSpan.FromSeconds(30));
            IWebElement element = GenericHelper.WaitForWebElementInPage(By.Name("component"), TimeSpan.FromSeconds(30));



            GenericHelper.TakeScreenShot();
            GenericHelper.TakeScreenShot("Test.jpeg");
        }
Exemplo n.º 2
0
 public void TestButton()
 {
     NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebsite());
     LinkHelper.ClickLink(By.LinkText("File a Bug"));
     TextBoxHelper.TypeInTextBox(By.Id("Bugzilla_login"), ObjectRepository.Config.GetUsername());
     TextBoxHelper.TypeInTextBox(By.Id("Bugzilla_password"), ObjectRepository.Config.GetPassword());
     //IWebElement element =  ObjectRepository.Driver.FindElement(By.Id("log_in"));
     // element.Click();
     Console.WriteLine("Enabled : {0}", ButtonHelper.IsButtonEnabled(By.Id("log_in")));
     Console.WriteLine("Button Text : {0}", ButtonHelper.GetButtonText(By.Id("log_in")));
     ButtonHelper.ClickButton(By.Id("log_in"));
 }
Exemplo n.º 3
0
 public void TestButton()
 {
     NavigationHelper.NavigateToUrl(ObjectRepository.Config.GetWebsite());
     Helper.Click(By.LinkText("File a Bug"));
     Helper.Text(By.Id("Bugzilla_login"), ObjectRepository.Config.GetUsername());
     Helper.Text(By.Id("Bugzilla_password"), ObjectRepository.Config.GetPassword());
     //ObjectRepository.Driver.FindElement(By.Id("log_in")).Click();
     Console.WriteLine("Enables: {0}", ButtonHelper.IsButtonEnabled(By.Id("log_in")));
     Console.WriteLine("Button Text: {0}", ButtonHelper.GetButtonText(By.Id("log_in")));
     ButtonHelper.ClickButton(By.Id("log_in"));
     Console.WriteLine("Page: {0}", Helper.GetTitle());
 }
Exemplo n.º 4
0
        public static void LogInNazaren()
        {
            NavigationHelper.NavigateToUrl("http://10.168.241.59/tcowebsitedemo");
            TextBoxHelper.SendKeys(By.Id("txtUserName"), ObjectRepository.Config.GetNazareneUser());
            TextBoxHelper.SendKeys(By.Id("txtPassword"), ObjectRepository.Config.GetNazarenPassword());
            Console.WriteLine("Is the Button Log In is Enabled :{0}", ButtonHelper.IsButtonEnabled(By.Id("btnLogIn")));

            Console.WriteLine("the web page title is :{0}", WindowHelper.GetTitle());
            Console.WriteLine("the button text is :{0}", ButtonHelper.GetButtonText(By.Id("btnLogIn")));
            ButtonHelper.ClickButton(By.Id("btnLogIn"));
            Thread.Sleep(3000);
        }
Exemplo n.º 5
0
 public void CheckButton()
 {
     NavigationHelper.NavigateToUrl(ObjectRepository.config.GetWebsite());
     LinkHelper.ClickOnLink(By.Id("enter_bug"));
     TextBoxHelper.TypeInTextBox(By.Id("Bugzilla_login"), ObjectRepository.config.GetUsername());
     TextBoxHelper.TypeInTextBox(By.Id("Bugzilla_password"), ObjectRepository.config.GetPassword());
     Console.WriteLine("Text on the Button is: {0}", ButtonHelper.ButtonText(By.Id("log_in")));
     if (ButtonHelper.IsButtonEnabled(By.Id("log_in")))
     {
         ButtonHelper.ClickButton(By.Id("log_in"));
     }
     else
     {
         Console.WriteLine("Button not enabled");
     }
 }
Exemplo n.º 6
0
        public void ClickLoginButton()
        {
            NavigationHelper.NavigationToURL(ObjectRepository.Config.GetWebsite());
            LinkHelper.ClickLink(By.LinkText("File a Bug"));
            Thread.Sleep(100);

            TextBoxHelper.ClearTextbox(By.Id("Bugzilla_login"));
            TextBoxHelper.TypeInTextbox(By.Id("Bugzilla_login"), ObjectRepository.Config.GetUsername());

            TextBoxHelper.ClearTextbox(By.Id("Bugzilla_password"));
            TextBoxHelper.TypeInTextbox(By.Id("Bugzilla_password"), ObjectRepository.Config.GetPassword());

            Console.WriteLine(CheckboxHelper.IsChecboxChecked(By.Id("Bugzilla_restrictlogin")));
            if (CheckboxHelper.IsChecboxChecked(By.Id("Bugzilla_restrictlogin")))
            {
                CheckboxHelper.CheckedCheckbox(By.Id("Bugzilla_restrictlogin"));
            }
            Console.WriteLine(CheckboxHelper.IsChecboxChecked(By.Id("Bugzilla_restrictlogin")));

            Console.WriteLine(ButtonHelper.GetButtonText(By.Id("log_in")));
            Console.WriteLine(ButtonHelper.IsButtonEnabled(By.Id("log_in")));
            ButtonHelper.ClickOnButton(By.Id("log_in"));
        }