Esempio n. 1
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();
        }
Esempio n. 2
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"));
        }