运行selenium相关代码时报错,提示:Cannot call non W3C standard command while in W3C mode,这是由于谷歌浏览器自带W3C检查,所以在启动时添加相关参数,禁用W3C检查就可以了。
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option('w3c', False)
运行selenium相关代码时报错,提示:Cannot call non W3C standard command while in W3C mode,这是由于谷歌浏览器自带W3C检查,所以在启动时添加相关参数,禁用W3C检查就可以了。
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_experimental_option('w3c', False)