selenium版本过高引起的报错
1,selenium错误代码TypeError: init() got an unexpected keyword argument ‘firefox_profile’
实际代码运行结果
test_last.py:8: DeprecationWarning: firefox_profile has been deprecated, please use an Options object
fp = webdriver.FirefoxProfile()
Traceback (most recent call last):
File “test_last.py”, line 23, in
driver = webdriver.Firefox(options=Firefoxoptions, firefox_profile=fp)
TypeError: init() got an unexpected keyword argument ‘firefox_profile’
2,selenium错误代码AttributeError: module ‘selenium.webdriver’ has no attribute ‘FirefoxOptions’
实际代码运行结果
λ python test_last.py
Traceback (most recent call last):
File “test_last.py”, line 15, in
Firefoxoptions = webdriver.FirefoxOptions()
AttributeError: module ‘selenium.webdriver’ has no attribute ‘FirefoxOptions’