selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: value must be a non-negative integer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-selenium (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I am using Selenium, Python, Chromedriver and Chrome browser to fill in a web form. The script automates filing FTC Do Not Call complaints. The script runs on Armbian, which is Ubuntu Bionic on armv7l.
The problem below is new and arrived today, which is June 19, 2019. File ftc.py:111 is 'implicitly_wait':
driver.get("https:/
driver.
I see similar problems with Firefox, but I don't see Chrome (yet). A Firefox example is https:/
I've tried to build these tools in the past, like Geckodriver. It looks like no testing occurs on ARM. For ARM, Rust cannot build the Cargo packages, which means Geckodriver cannot be built. Trying to do anything with Rust, Cargo and Geckodriver is a complete waste of time.
-----
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
-----
Traceback (most recent call last):
File "./ftc.py", line 281, in <module>
main()
File "./ftc.py", line 111, in main
driver.
File "/usr/lib/
'implicit': int(float(
File "/usr/lib/
self.
File "/usr/lib/
raise exception_
selenium.
(Session info: headless chrome=
-----
$ apt-cache show chromium-browser
Package: chromium-browser
Architecture: armhf
Version: 75.0.3770.
Priority: optional
Section: universe/web
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
$ apt-cache show python3-selenium
Package: python3-selenium
Architecture: all
Version: 3.8.0+dfsg1-3
Priority: optional
Section: universe/python
Source: python-selenium
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Here's the reproducer.
#!/usr/bin/env python3
import time
import sys
import selenium
import os.path
from packaging import version webdriver. chrome. options import Options
from selenium import webdriver
from selenium.
def get_chrome(): isfile( '/usr/bin/ chromium- browser' ): chromium- browser' isfile( '/usr/bin/ chromium' ): isfile( '/usr/bin/ chrome' ): isfile( '/usr/bin/ google- chrome' ): google- chrome'
if os.path.
return '/usr/bin/
elif os.path.
return '/usr/bin/chromium'
elif os.path.
return '/usr/bin/chrome'
elif os.path.
return '/usr/bin/
else:
return None
def main(): parse(selenium. __version_ _) >= version. parse(" 3.0"):
opts.binary_ location = get_chrome()
opts.add_ argument( '--headless' )
opts.add_ argument( '--no-sandbox' )
opts.add_ argument( '--disable- dev-shm- usage')
if version.
opts = Options()
driver = webdriver. Chrome( chrome_ options= opts)
driver. maximize_ window( )
opts.headless = True
opts.binary_ location = get_chrome()
else:
opts = Options()
driver = webdriver. Chrome( chrome_ options= opts)
driver. maximize_ window( )
agent = driver. execute_ script( 'return navigator. userAgent' ) /complaints. donotcall. gov/complaint/ complaintcheck. aspx") implicitly_ wait(2)
driver.get("https:/
driver.
driver.quit()
if __name__ == "__main__":
main()