Lighter web automation for Python
This bumps Selenium from < 4.10 to >= 4.16, which introduces a backwards-incompatible change: start_chrome(...)
used to take a capabilities
parameter. This is no longer supported by Selenium. Instead, you have to use set_capability(...)
as follows:
from helium import start_chrome
from selenium.webdriver.chrome.options import Options
options = Options()
options.set_capability('goog:loggingPrefs', {'performance': 'ALL'})
start_chrome(options=options)
Thank you @tbp105 and @petrisorionel for the amazing contribution!
See the new automated test test_find_all_nested_search_areas
for an example of how it was broken.
Since release 3.2.4, start_chrome(...)
always used to download chromedriver
again.
The error was
get_chrome_driver.exceptions.VersionError: Unable to find a ChromeDriver version for the installed Chrome version
It was caused by our dependency for webdriver management not supporting current Chrome versions.
The drawback is that the new webdriver management solution doesn't cache properly. See https://github.com/SergeyPirogov/webdriver_manager/pull/582.
This could happen when iframes were involved and changed during Helium's search process.
There was an error when no compatible chromedriver
was on PATH
.
Previous releases of Helium shipped with the chromedriver
binaries, which are necessary for starting and controlling Chrome. But these binaries got outdated very quickly. This release switches to an approach that automatically downloads a matching chromedriver
when none is installed on the system.
Kudos to @zaironjacobs for the nice library that makes this possible.
start_chrome(...)
failed with the following error:
ValueError: Timeout value connect was <object object at 0x...>, but it must be an int, float or None.
This happened because Selenium 3 depends on urllib3
, but is incompatible with urllib3 >= 2
.
Thank you @a-l-e-c for the PR!