AttributeError: 'Options' object has no attribute 'binary' error invoking Headless Firefox using GeckoDriver through Selenium
问题 options = FirefoxOptions() options.add_argument("--headless") driver = webdriver.Firefox(firefox_options=options, executable_path='/Users/toprak/Desktop/geckodriver') driver.get("https://twitter.com/login?lang=en") When I try to run my code, I get this error: Warning (from warnings module): File "/Users/toprak/Desktop/topla.py", line 19 driver = webdriver.Firefox(firefox_options=options, executable_path='/Users/toprak/Desktop/geckodriver') DeprecationWarning: use options instead of firefox