Home  >  Article  >  Backend Development  >  Why am I getting \"WebDriverException: Invalid Argument\" with GeckoDriver on my Raspberry Pi 3?

Why am I getting \"WebDriverException: Invalid Argument\" with GeckoDriver on my Raspberry Pi 3?

DDD
DDDOriginal
2024-10-26 18:35:02411browse

Why am I getting

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn