Published by mherrmann 3 months ago
It sometimes happened. Now, wait_until(...)
handles this error gracefully by just waiting a little more.
Published by mherrmann 4 months ago
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "helium/__init__.py", line 172, in write
_get_api_impl().write_impl(text, into)
File "helium/_impl/__init__.py", line 36, in f_decorated
result = f(self, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 55, in f_decorated
return f(*args, **kwargs)
^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 145, in write_impl
self._handle_alerts(
File "helium/_impl/__init__.py", line 170, in _handle_alerts
return no_alert(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 156, in _write_no_alert
self._manipulate(into, _write)
File "helium/_impl/__init__.py", line 280, in _manipulate
driver.last_manipulated_element = gui_or_web_elt.perform(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 622, in perform
result = self._perform_no_wait(action)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 629, in _perform_no_wait
for bound_gui_elt_impl in self.find_all():
File "helium/_impl/__init__.py", line 593, in find_all
for occurrence in self.find_all_occurrences():
File "helium/_impl/__init__.py", line 691, in find_all_occurrences
for occurrence in self._find_all_in_curr_frame():
File "helium/_impl/__init__.py", line 712, in _find_all_in_curr_frame
for occurrence in self.find_anywhere_in_curr_frame():
File "helium/_impl/__init__.py", line 1037, in find_anywhere_in_curr_frame
for bound_gui_elt_impl in element.find_anywhere_in_curr_frame():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 913, in find_anywhere_in_curr_frame
result = list(self._filter_elts_belonging_to_labels(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 950, in _filter_elts_belonging_to_labels
labels_to_elts = self._ensure_at_most_one_label_per_elt(labels_to_elts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 993, in _ensure_at_most_one_label_per_elt
self._retain_closest(elts_to_labels)
File "helium/_impl/__init__.py", line 998, in _retain_closest
closest = self._find_closest(pivot, elts)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "helium/_impl/__init__.py", line 1012, in _find_closest
return sorted(distances)[0][1]
^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'WebElementWrapper' and 'WebElementWrapper'
Published by mherrmann 4 months ago
Published by mherrmann 11 months ago
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)
Published by mherrmann 12 months ago
Thank you @tbp105 and @petrisorionel for the amazing contribution!
Published by mherrmann about 1 year ago
See the new automated test test_find_all_nested_search_areas
for an example of how it was broken.
Published by mherrmann about 1 year ago
Since release 3.2.4, start_chrome(...)
always used to download chromedriver
again.
Published by mherrmann about 1 year ago
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.
Published by mherrmann over 1 year ago
This could happen when iframes were involved and changed during Helium's search process.
Published by mherrmann over 1 year ago
There was an error when no compatible chromedriver
was on PATH
.
Published by mherrmann over 1 year ago
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.
Published by mherrmann over 1 year ago
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
.
Published by mherrmann almost 2 years ago
Thank you @a-l-e-c for the PR!
Published by mherrmann about 3 years ago
These options let you start the Chrome window maximized, or pass a DesiredCapabilities
object for further customizations.
Thank you @tarunjarvis5 and @petrisorionel for the PRs!
Published by mherrmann over 3 years ago
This exception spuriously occurred in some automation scripts.
Published by mherrmann over 3 years ago
Thanks @avinashtechlvr for the PR!
Published by mherrmann about 4 years ago
Helium ships with its own copies of gecko- and chromedriver. These binaries quickly become outdated. Previously, there was no easy way to "fix" Helium's webdrivers for your machine.
No longer. Now, Helium first attempts to use chromedriver
and geckodriver
from your PATH
. This lets you install the versions of those drivers that work on your system.
The implementation is based on a PR by @TotallyNotChase. Thank you!
Published by mherrmann over 4 years ago
See the new test test_drag_point
.
Published by mherrmann over 4 years ago
Thank you @ftnext for the PR!
Published by mherrmann over 4 years ago
Added an argument options
to start_chrome(...)
. You can use it to supply the ChromeOptions
when starting the browser. For example:
from selenium.webdriver import ChromeOptions
options = ChromeOptions()
options.add_argument('--start-maximized')
options.add_argument('--proxy-server=1.2.3.4:5678')
start_chrome(options=options)