public void CanTestCode()
        {
            //TODO : code part
            Commonfield.CodeTest();

            //TODO: View form detail


            //TODO :New Form
            Commonfield.GeneralField();


            //TODO : Edit form
            code.SendKeys(Keys.Enter);
            Thread.Sleep(1500);
            IWebElement EditIcon = grid2.FindElements(By.ClassName("fa-pencil-square-o"))[1];

            js2.ExecuteScript("arguments[0].click();", EditIcon);
            IWebElement Editwin = ElementFinder.FindById("countryFormView");

            ExplicitWait.WaitName("code");
            Editwin.FindElement(By.Name("description")).SendKeys("8");
            Editwin.FindElement(By.ClassName("fa-floppy-o")).Click();
            IWebElement Editokbutton1 = Browser.Driver.FindElement(By.Id("button-1014"));

            Editokbutton1.Click();
            ExplicitWait.WaitId("country-list-grid");

            //TODO Delete form
            Commonfield.DeletePart();
        }
        public void ClickSave(int existingBookings)
        {
            SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(btnSave);

            btnSave.Click();
            ExplicitWait.Until(wd => Utilities.WaitForNewbookingAppears(existingBookings, Driver));
        }
Esempio n. 3
0
 public void CanAccessCountry()
 {
     ExplicitWait.WaitId("image-1022");
     Browser.Goto("#country");
     ExplicitWait.WaitName("code");
     Pages.Country.CanTestCode();
 }
 public void ClickDeleteButon()
 {
     foreach (IWebElement deleteItem in RowsToDelete)
     {
         ExplicitWait.Until(Dr => SeleniumExtras.WaitHelpers.ExpectedConditions.ElementToBeClickable(deleteItem));
         deleteItem.Click();
     }
 }
 public int GetTotalLatestBookings()
 {
     ExplicitWait.Until(wd => Utilities.WaitForPageFullyloaded(10000, 150, Driver) == true);
     return(TotalBookings.Count - 1);
 }
        public void CanTestCode()
        {
            //TODO : code part
            ExplicitWait.WaitName("code");
            IWebElement code = ElementFinder.FindByName("code");

            ExplicitWait.WaitName("code");
            code.SendKeys(Keys.Enter);
            code.SendKeys("2");
            code.SendKeys(Keys.Enter);
            ExplicitWait.WaitName("code");
            code.Clear();
            code.SendKeys(Keys.Enter);
            ExplicitWait.WaitId("country-list-grid");

            //TODO: View form detail
            IWebElement grid2 = ElementFinder.FindById("country-list-grid");

            Thread.Sleep(1500);
            IWebElement         viewIcon = grid2.FindElements(By.ClassName("fa-eye"))[1];
            IJavaScriptExecutor js2      = (IJavaScriptExecutor)Browser.Driver;

            js2.ExecuteScript("arguments[0].click();", viewIcon);
            IWebElement viewwin = ElementFinder.FindById("countryFormView");

            Thread.Sleep(7000);
            IWebElement Closebutton = ElementFinder.FindById("cancel-button");

            Closebutton.Click();

            //TODO :New Form
            Commonfield.GeneralField();


            //TODO : Edit form
            code.SendKeys(Keys.Enter);
            Thread.Sleep(1500);
            IWebElement EditIcon = grid2.FindElements(By.ClassName("fa-pencil-square-o"))[1];

            js2.ExecuteScript("arguments[0].click();", EditIcon);
            IWebElement Editwin = ElementFinder.FindById("countryFormView");

            ExplicitWait.WaitName("code");
            Editwin.FindElement(By.Name("description")).SendKeys("8");
            Editwin.FindElement(By.ClassName("fa-floppy-o")).Click();
            IWebElement Editokbutton1 = Browser.Driver.FindElement(By.Id("button-1014"));

            Editokbutton1.Click();
            ExplicitWait.WaitId("country-list-grid");

            //TODO Delete form
            code.SendKeys(Keys.Enter);
            Thread.Sleep(3000);
            IWebElement deleteicon = grid2.FindElements(By.ClassName("fa-trash-o"))[1];

            deleteicon.Click();
            IWebElement deleteokbutton = Browser.Driver.FindElement(By.Id("button-1014-btnWrap"));

            Thread.Sleep(3000);
            deleteokbutton.Click();
            Thread.Sleep(15000);
        }