コード例 #1
0
        public void test()
        {
            element = (IWebelement)driver.FindElement(By.Id("realbox"));
            element.SendKeys("iLAB Quality");

            element = (IWebelement)driver.FindElement(By.Id("realbox-icon")); element.Click();
        }
コード例 #2
0
        public void cssDemo()
        {
            driver       = new ChromeDriver("C:\\Users\\acer\\Desktop\\DesignPatternsTestAutomation\\DesignPatternsTestAutomation\\PresentFirst\\PatternTest\\drivers\\chromdriver.exe");
            m_driver.Url = "http://demo.guru99.com/test/guru99home/";
            m_driver.Manage().Window.Maximize();
            IWebelement link = m_driver.FindElement(By.XPath(".//*[@id='rt-header']//div[2]/div/ul/li[2]/a"));

            link.Click();
            m_driver.Close();
        }