コード例 #1
0
        public void SearchToolSelenium_ClickFirstResult_ExpectedToBe_SeleniumWebBrowserAutomation()
        {
            IWebElement searchField = Driver.FindElement(By.XPath("//*[@class = 'gLFyf gsfi']"));

            searchField.SendKeys("selenium");
            searchField.SendKeys(Keys.Enter);

            this.WaitForLoad();
            IWebElement searchFirstResult = Wait.Until <IWebElement>(d => d.FindElement(By.XPath("/html/body/div[6]/div[2]/div[9]/div[1]/div[2]/div/div[2]/div[2]/div/div/div[1]/div/div[1]/a/h3")));

            _practiceFormPage.AssertCheckPageTitle(searchFirstResult);
        }