from selenium import webdriver
from selenium.common.exceptions import TimeoutException
from selenium.webdriver.support.ui import WebDriverWait # available since 2.4.0
import time
# Create a new instance of the Firefox driver
driver = webdriver.Firefox()
# go to the google home page
driver.get("http://www.google.com")
这会打开一个 Firefox 窗口,但不会打开一个 url。
1或2会是个问题吗?如果是,那我该如何解决?
最佳答案
我有类似的问题。我所要做的就是删除现有的 geckodriver.exe 并下载其最新版本。您可以在这里找到最新版本 https://github.com/mozilla/geckodriver/releases .
关于Selenium WebDriver.get(url) 不打开 URL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7347494/