Skip to content

Releases: seleniumbase/SeleniumBase

4.6.1 - Fix console width issue with SB Manager

14 Oct 19:24
a78d440
Compare
Choose a tag to compare

Fix console width issue with SB Manager

  • Fix issue with getting console width.
    --> This resolves #1549
  • Fix issue with printing during multi-process runs.
    --> b7dc6e9
  • Refresh Python dependencies.
    --> cd620db

What's Changed

Full Changelog: v4.6.0...v4.6.1

4.6.0 - Context Managers and more

14 Oct 08:12
c406380
Compare
Choose a tag to compare

Context Managers and more

  • Add support for SeleniumBase as a Context Manager
    --> This resolves #1547
  • Add support for the SeleniumBase Driver Manager as a Context Manager
    --> This resolves #1546
  • Add support for undetected-chromedriver as a subprocess.
  • Add timeout options to click_if_visible() methods.
  • Improve output for downloading drivers.
  • Update output of visual comparisons.
  • Update default driver versions.
  • Update console scripts.

What's Changed

Full Changelog: v4.5.6...v4.6.0

4.5.6 - Performance Testing decorators

11 Oct 00:07
e8eb0c6
Compare
Choose a tag to compare

Performance Testing decorators

  • Add Python decorators for performance testing
    --> 06c1959
    --> This resolves #1544
  • Refresh Python dependencies
    --> d69964b
  • Update tests with examples of performance testing
    --> 759423a

  • print_runtime(description=None, limit=None)
  • runtime_limit(limit, description=None)

  • print_runtime(description=None, limit=None)

Print the total runtime of the method / function or code block. The description option can be used for organizing the output when a test calls this multiple times. The limit option can be used to optionally set a time limit so that the test fails if the decorated code block takes longer than the time limit to complete (after it completes).

Method / Function example usage ->

from seleniumbase import decorators

@decorators.print_runtime("My Method")
def my_method():
    # code ...
    # code ...

with-block example usage ->

from seleniumbase import decorators

with decorators.print_runtime("My Code Block"):
    # code ...
    # code ...

  • runtime_limit(limit, description=None)

Fail if the runtime duration of a method or "with"-block exceeds the limit. (The failure won't occur until after the method or "with"-block completes.) The description option can be used for making the output more clear about which code block failed.

Method / Function example usage ->

from seleniumbase import decorators

@decorators.runtime_limit(4.5)
def my_method():
    # code ...
    # code ...

``with``-block example usage ->

```python
from seleniumbase import decorators

with decorators.runtime_limit(32):
    # code ...
    # code ...

What's Changed

Full Changelog: v4.5.5...v4.5.6

4.5.5 - Add option to disable JavaScript in tests

06 Oct 05:34
db0ac9b
Compare
Choose a tag to compare

Add option to disable JavaScript in tests

  • Add option to disable JavaScript during tests:
    --> 99b63cd
    --> This resolves #1542
    --> --disable-js

What's Changed

Full Changelog: v4.5.4...v4.5.5

4.5.4 - Fix all known bugs (up to this point)

04 Oct 03:53
ab43a74
Compare
Choose a tag to compare

Fix all known bugs (up to this point)

  • Fix issue with loading more data than needed.
    --> This resolves #1540
  • Fix issue with the "behave" Dashboard and GUI App
    --> This resolves #1539
  • Refactoring.
    --> Includes fixes for bugs on older versions of Python.

What's Changed

Full Changelog: v4.5.3...v4.5.4

4.5.3 - Refactor reports

02 Oct 18:49
d117223
Compare
Choose a tag to compare

Refactor reports

  • Refactor reports
    --> (See below for an example in the new format)
  • Refresh Python dependencies
    --> rich==12.6.0

Here's an example of a basic_test_info.txt report in the new format:

test_fail.py::FailingTests::test_find_army_of_robots_on_xkcd_desert_island
--------------------------------------------------------------------
Last Page: https://xkcd.com/731/
 Duration: 1.59s
  Browser: Chrome 105.0.5195.125 / headless
   Driver: chromedriver 105.0.5195.52
Timestamp: 1664724374  (Unix Timestamp)
     Date: Sunday, October 2, 2022
     Time: 11:26:14 AM  (EDT, UTC-05:00)
--------------------------------------------------------------------
Traceback: File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/unittest/case.py", line 591, in run
    self._callTestMethod(testMethod)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/unittest/case.py", line 549, in _callTestMethod
    method()
  File "/Users/michael/github/SeleniumBase/examples/test_fail.py", line 16, in test_find_army_of_robots_on_xkcd_desert_island
    self.assert_element("div#ARMY_OF_ROBOTS", timeout=1)
  File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/base_case.py", line 10414, in assert_element
    self.wait_for_element_visible(selector, by=by, timeout=timeout)
  File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/base_case.py", line 7786, in wait_for_element_visible
    return page_actions.wait_for_element_visible(
  File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/page_actions.py", line 420, in wait_for_element_visible
    timeout_exception(NoSuchElementException, message)
  File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/page_actions.py", line 189, in timeout_exception
    raise exc(msg)
Exception: Message: 
 Element {div#ARMY_OF_ROBOTS} was not present after 1 second!

What's Changed

Full Changelog: v4.5.2...v4.5.3

4.5.2 - Improve test reports

02 Oct 00:38
5fab890
Compare
Choose a tag to compare

Improve test reports

  • Include test duration in the basic_test_info.txt file.
    --> This resolves #1535
  • Fix nosetest reports.
    --> This resolves #1536

What's Changed

Full Changelog: v4.5.1...v4.5.2

4.5.1 - Fix issue with "behave" headless mode, and more

30 Sep 02:08
c284ae2
Compare
Choose a tag to compare

Fix issue with behave headless mode, and more

  • Fix issue with behave headless mode.
    --> This resolves #1532
  • Improve self.get_unique_links() for a special edge case.
  • Add useful test variables, such as self.version_info / self.version_tuple.
  • Refresh Python dependencies.
    --> 12d6e4b

What's Changed

  • Fix issue with "behave" headless mode, and more by @mdmintz in #1533

Full Changelog: v4.5.0...v4.5.1

4.5.0 - Support for beta/dev builds of Chromium, and more

29 Sep 00:03
f1bc9ce
Compare
Choose a tag to compare

Support for beta/dev builds of Chromium, and more

  • Add support for beta and dev builds of Chromium.
    --> This resolves #1528
  • Fix issue with a missing Dashboard link during multithreaded tests.
    --> This resolves #1529
  • Upgrade selenium / Refresh Python dependencies.
    --> This resolves #1530

What's Changed

  • Support for beta/dev builds of Chromium, and more by @mdmintz in #1531

Full Changelog: v4.4.4...v4.5.0

4.4.4 - "--headless2" to activate Chromium's new headless mode

26 Sep 03:32
0e9afde
Compare
Choose a tag to compare

--headless2 to activate Chromium's new headless mode

  • Integrate Chromium's new headless mode into SeleniumBase
    --> This resolves #1523
  • Improve get_unique_links() for special scenarios
    --> This resolves #1524
  • Refresh Python dependencies
    --> 8c3c237

Integrate Chromium's new headless mode into SeleniumBase

The Chromium developers recently added a 2nd headless mode (in 2021). See https://bugs.chromium.org/p/chromium/issues/detail?id=706008#c36

Usage (from instantiating Chromium options):

options.add_argument("--headless=chrome")

This new headless mode allows users to get the full functionality of Chrome without limitations. The older, regular headless mode has restricted functionality, did not allow extensions, changed the User-Agent to say HeadlessChrome, and did other things that may have caused problems during automation.

If something works in regular Chrome, it should now work with the newer headless mode too. The only downside is that the new headless mode is slower than the regular headless mode.

To use the new headless mode for SeleniumBase tests, specify: --headless2:

pytest --headless2

What's Changed

  • "--headless2" to activate Chromium's new headless mode by @mdmintz in #1525

Full Changelog: v4.4.3...v4.4.4