Skip to content

Releases: mherrmann/helium

Fix relative searches

04 Feb 17:00
ac354ad

Choose a tag to compare

The previous release 6.0.0 was not able to find Button('Duplicate Button', to_left_of=Button('Duplicate Button', below=Button('Duplicate Button'))) in the following arrangement:

image

This release fixes this. It changes which elements are found and is therefore a major version.

Improve the behavior of find_all

13 Jan 09:22
7aa9311

Choose a tag to compare

find_all had the following bug:

Imagine you have the following code:

for label in find_all(Text('Label')):
    print(Link(to_right_of=label).href)

The bug was that this used the same Link for each label, producing output for links that actually were not to_right_of the label in the loop.

Furthermore, this release also changes the behavior of find_all in the following way. Say you have four buttons in a 2x2 grid:

image

Previously, the following code used to return two buttons:

find_all(Button("Duplicate Button"), below=Button("Duplicate Button"))

(Namely, the two buttons in the second row, because they are both under a "Duplicate Button").

Now, this only returns one button (the first button in the second row). If you want both, you can still do:

for button in find_all(Button("Duplicate Button")):
    find_all(Button("Duplicate Button", below=button))

This release is a major version bump (6.x.x) because it changes the elements returned by Helium's API and may therefore be backwards-incompatible.

Prevent Chrome's leaked password detection

10 Nov 07:14
967183f

Choose a tag to compare

Recent Chrome versions have a feature that sometimes brings up a blocking prompt The password you just used was found in a data breach. This can interfere with automation. This release prevents it from being used.

Fix start_firefox(..., profile=profile)

20 Feb 16:06
59929ed

Choose a tag to compare

Add support for input type=date and ...=time

23 Aug 09:13
9dac617

Choose a tag to compare

See 2100561.

This is a minor version upgrade (5.0.... -> 5.1....) because the new implementation may find slightly different text fields.

Fix a small bug in find_all(...)

14 Aug 08:51
eac576f

Choose a tag to compare

It was introduced in v5.0.5.

Avoid some FramesChangedWhileIterating errors

14 Aug 08:41
654ded1

Choose a tag to compare

v5.0.5

Bump version to 5.0.5

Fix NoSuchElementException print(...)ing elements outside the current frame

14 Aug 07:49
b90ead0

Choose a tag to compare

Fix error "FramesChangedWhileIterating" in wait_until

23 Jul 07:33
466b4c0

Choose a tag to compare

It sometimes happened. Now, wait_until(...) handles this error gracefully by just waiting a little more.

Fix a TypeError

11 Jul 07:38
04006a2

Choose a tag to compare

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'