WebDriver can't find element by xpath using Java

后端 未结 6 1880
甜味超标
甜味超标 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:44

    Since you want the Polish Google site the

        //input[@title='Google Search']
    

    will not work for you. Instead use

        //input[@title='Szukaj w Google']
    

提交回复
热议问题