Selenium.common.exceptions.webdriverexception: Message: Invalid Argument: Value Must Be A Non-negative Integer With Chromedriver And Selenium
I am working on selenium (3.5.0),Python 3.6.8 i wanted to test simple code that is written below driver.implicitly_wait(10) driver.get(url) print(driver.title) sleep(6) driver.clos
Solution 1:
This error message...
selenium.common.exceptions.WebDriverException: Message: invalid argument: value must be a non-negative integer
...implies that the ChromeDriver was unable to initiate/spawn a new WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- Presumably you are using the latest chromedriver=77.0
- Presumably you are using chrome= 77.0.
- Your Selenium Client version is 3.6.8 which is ancient.
So there is a clear mismatch between the Selenium Client v3.6.8 , ChromeDriver v77.0 and the Chrome Browser v77.0
Solution
Ensure that:
- Selenium is upgraded to current levels Version 3.141.59.
- ChromeDriver is updated to current ChromeDriver v77.0 level.
- Chrome is updated to current Chrome Version 77.0 level. (as per ChromeDriver v77.0 release notes)
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
- If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
- Take a System Reboot.
- Execute your
@Test
as non-root user. - Always invoke
driver.quit()
withintearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully.
Post a Comment for "Selenium.common.exceptions.webdriverexception: Message: Invalid Argument: Value Must Be A Non-negative Integer With Chromedriver And Selenium"