Example #1
0
        public void check_jim_is_on_page()
        {
            ContactGridPageObject page = new ContactGridPageObject(browser);

            page.WaitUntilGridIsPopulatedWithRows(browser);
            Assert.IsNotNull(page.GetRowByRowTextContent("Jim"));
        }
Example #2
0
        public void grid_is_populated()
        {
            ContactGridPageObject page = new ContactGridPageObject(browser);

            //I'm not happy with this implementation right now. Need to rethink!
            Assert.IsTrue(page.WaitUntilGridIsPopulatedWithRows(browser));
        }
Example #3
0
        public void contact_shows_on_grid()
        {
            ContactGridPageObject page = new ContactGridPageObject(browser);
            IWebElement           row  =
                page.GetGridRowByIdSubstringContactName(testContact.LName);

            Assert.IsNotNull(row);
        }
Example #4
0
        public void setup()
        {
            testContact = DataHelpers.Generate_random_contact();
            browser     = new FirefoxDriver();
            wait        = new WebDriverWait(browser, TimeSpan.FromSeconds(30));

            browser.Navigate().GoToUrl("http://jhdemos.azurewebsites.net/KendoGrid.html");

            ContactGridPageObject  page   = new ContactGridPageObject(browser);
            ContactPopUpPageObject create = page.GetContactPopUp();

            create.Company = testContact.Company;
            create.Region  = testContact.Region;
            create.LName   = testContact.LName;
            create.FName   = testContact.FName;
            create.UpdateButton.Click();
        }
Example #5
0
        public void create_contact_appears_on_grid()
        {
            ContactDataObject contact = new ContactDataObject();

            contact.Company = "Guidepost Systems LLC";
            contact.Region  = "Oregon";
            contact.LName   = "Holmes";
            contact.FName   = "Lydia";

            ContactGridPageObject  gridPage   = new ContactGridPageObject(browser);
            ContactPopUpPageObject editWindow = gridPage.GetContactPopUp();

            editWindow.Company = contact.Company;
            editWindow.Region  = contact.Region;
            editWindow.LName   = contact.LName;
            editWindow.FName   = contact.FName;
            editWindow.UpdateButton.Click();
            string testXPath = "//tbody/tr[contains(.,'Lydia')]";

            wait.Until(ExpectedConditions.ElementExists(By.XPath(testXPath)));
            Assert.IsNotNull(gridPage.GetRowByRowTextContent("Lydia"));
        }