Home > Article > Backend Development > Why am I getting \'WebDriverException: Invalid Argument\' with GeckoDriver on my Raspberry Pi 3?
WebDriverException: Invalid Argument Error in Selenium with GeckoDriver on Raspberry Pi 3
This exception occurs when you attempt to interact with a WebDriver instance that has previously been terminated. The question relates to a scenario where Selenium is used with Firefox on a Raspberry Pi 3 device, encountering the error:
selenium.common.exceptions.WebDriverException: Message: invalid argument: can't kill an exited process
To address this issue, ensure that you are running Firefox in headless mode if your system does not have a display:
<code class="python">options = Options() options.headless = True driver = webdriver.Firefox(options=options)</code>
Additionally, verify that you are using compatible versions of Firefox, Selenium, and Geckodriver. Consult the Mozilla documentation for the specific compatibility requirements:
https://firefox-source-docs.mozilla.org/testing/geckodriver/Support.html
The above is the detailed content of Why am I getting \'WebDriverException: Invalid Argument\' with GeckoDriver on my Raspberry Pi 3?. For more information, please follow other related articles on the PHP Chinese website!