Selenium WebDriver.get(url) does not open the URL

前端 未结 18 2022
醉梦人生
醉梦人生 2020-11-29 07:36
from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui impo         


        
18条回答
  •  情书的邮戳
    2020-11-29 07:52

    Please have a look at this HowTo: http://www.qaautomation.net/?p=373 Have a close look at section "Instantiating WebDriver"

    I think you are missing the following code line:

    wait = new WebDriverWait(driver, 30);
    

    Put it between

    driver = webdriver.Firefox();
    

    and

    driver.getUrl("http://www.google.com");
    

    Haven't tested it, because I'm not using Selenium at the moment. I'm familiar with Selenium 1.x.

提交回复
热议问题