报错:
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Opera binary
解决地址:
https://github.com/operasoftware/operachromiumdriver/issues/31
具体代码:
def opera_test():
options = webdriver.ChromeOptions()
options.binary_location = 'D:\MySoftware\opera\opera.exe'
driver = webdriver.Opera(options=options)
driver.get('https://www.baidu.com')
sleep(3)
driver.quit()
启动路径地址一定要填写opera路径下的opera.exe执行文件 千万不要填launcher.exe 会启动失败的