WebDriver can't find element by xpath using Java

后端 未结 6 1811
甜味超标
甜味超标 2021-01-21 22:52

The following is the snippet of WebDriver code using Java:

        WebDriver driver = new FirefoxDriver();
        driver.get(\"http://www.google.pl/\");
                


        
6条回答
  •  悲&欢浪女
    2021-01-21 23:45

    The XPath Used is Incorrect Here Directly Id is there so no need to use XPath.

    driver.findElement(By.id("gbqfq")).sendKeys("xyz");
    

提交回复
热议问题