尝试在我的 Windows 10 机器上运行此代码https://github.com/KalleHallden/reddit_automations/blame/master/movie-tickets.py
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from decouple import config
import time
# the way to locate the button or thing you want on a website in chrome is
# by pressing cmd + shift + c and then you can use your mouse to find the
# info on the element that you want and you can copy the full xpath.
options = webdriver.ChromeOptions()
# options.add_argument('--ignore-certificate-errors')
# options.add_argument('--incognito')
# options.add_argument('--headless')
driver = …Run Code Online (Sandbox Code Playgroud) python selenium google-chrome selenium-chromedriver windows-10
如果我们创建:
ChromeDriver driver=new ChromeDriver();
Run Code Online (Sandbox Code Playgroud)
chrome 驱动程序方法将被执行。
如果我们创建:
WebDriver driver=new ChromeDriver();
Run Code Online (Sandbox Code Playgroud)
再次ChromeDriver执行方法[根据方法覆盖]。
那为什么我们只在执行时写后一个呢?
java selenium webdriver selenium-webdriver webdriver-w3c-spec