Skip to content Skip to sidebar Skip to footer

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

Solution 1:

Instead of using firefox_options object you need to use options object. Additionally you need to use the headless attribute. So your effective code block will be:

options = FirefoxOptions()
options.headless = True

driver = webdriver.Firefox(executable_path='/Users/toprak/Desktop/geckodriver', options=options) 
driver.get("https://twitter.com/login?lang=en")

References

You can find a couple of relevant detailed discussions in:

Post a Comment for "Attributeerror: 'options' Object Has No Attribute 'binary' Error Invoking Headless Firefox Using Geckodriver Through Selenium"