Skip to content

Releases: seleniumbase/SeleniumBase

Invoke console scripts with: "python -m seleniumbase"

19 May 05:39
91ca4a2
Compare
Choose a tag to compare

Invoke console scripts with: python -m seleniumbase <COMMAND>

You can now do:

  • python -m seleniumbase <COMMAND>
  • python -m sbase <COMMAND>

Or to list all commands, run:

  • python -m seleniumbase
  • python -m sbase

You can still use seleniumbase or sbase by itself.

Add "protocol" option for selecting a Selenium Grid server

18 May 18:46
dd54fd3
Compare
Choose a tag to compare

Add protocol option for selecting a Selenium Grid server.

  • Protocol usage: --protocol=http OR --protocol=https.
    -- (Only used when selecting a Selenium Grid server to connect to.)
  • Also, use two decimal places for dashboard times in seconds.
  • Also, update Python dependencies:
    -- sortedcontainers==2.4.0
    -- decorator==5.0.9;python_version>="3.5"
    -- rich==10.2.1;python_version>="3.6"

Update visual baseline folder naming and dependencies

12 May 20:57
966f169
Compare
Choose a tag to compare

Update visual baseline folder naming and dependencies

  • Fix #903 by making the visual layout comparison be done against test/name instead of file_class_test/name. This lets two different tests (same name, but located in different files/classes) be able to do a visual layout comparison against each other.
  • Also update Python dependencies: (rich==10.2.0;python_version>="3.6")

Compatibility updates and more

10 May 23:28
a567251
Compare
Choose a tag to compare

Compatibility updates and more

  • Improve compatibility on older versions of Python.
  • Use the IPython debugger by default (ipdb).
  • Update Python dependencies:
    -- setuptools>=56.2.0;python_version>="3.6"
    -- decorator==5.0.7;python_version>="3.5"

Perform code optimization

08 May 18:45
ab03b2b
Compare
Choose a tag to compare

Perform code optimization

  • The code is now fully flake8 compliant and black compliant.
  • The sbase mkdir DIR command now generates optimized code.
  • (flake8 is still the law of the land for CI builds.)
  • Update a Python dependency: (attrs>=21.2.0)
  • Update universal translations: (related to file downloads)

For more info about flake8 and black, see:

Update console scripts and dashboard display

06 May 01:34
e82f67f
Compare
Choose a tag to compare

Update console scripts and dashboard display

  • Update console script: sbase mkdir DIR
  • Update output of console script: sbase options
  • Display Dashboard tests with logs before ones without logs.
  • Continue refactoring the code with Python black.
  • Update Python dependencies:
    -- setuptools>=56.1.0;python_version>="3.6"
    -- six==1.16.0
    -- pytest==6.2.4;python_version>="3.6"
    -- ipython==7.23.1;python_version>="3.7"
    -- virtualenv>=20.4.6

Initial Python "black" refactoring

04 May 02:53
8ded5fa
Compare
Choose a tag to compare

Initial Python "black" refactoring

  • Optimize code with syntax refactoring using https://github.com/psf/black
    -- ("The uncompromising Python code formatter")
  • Also update Python dependencies:
    -- typing-extensions>=3.10.0.0
    -- pygments==2.9.0;python_version>="3.5"
    -- ipython==7.23.0;python_version>="3.7"
    -- matplotlib-inline==0.1.2;python_version>="3.7"

Dashboard upgrades and a lot more

01 May 04:16
1b9c750
Compare
Choose a tag to compare

Dashboard upgrades and a lot more

  • Use color-coded rows for Dashboard results (Eg. Red => failed).
  • For any test that generates logs, include that link on the Dashboard.
  • Log "skip reason" data about tests that are marked as skipped.
  • Make Dashboard resources available locally (CSS / JS / favicon).
  • Add method for saving a screenshot directly to the logs.
  • Add methods for asserting the attribute of an element.
  • Add methods to get the versions of Chrome and chromedriver.
  • Add method for checking if the version of chromedriver is too old.
  • Update Python dependencies (pip>=21.1.1).
  • Fix issue with browser selection during multithreaded mode.
  • Fix issue that may cause the page source to render incorrectly.
  • Update the ad_block_list.
  • Update Dutch translations to use "attribuut" instead of "kenmerk".
  • Refactor imports and exception-handling code.
  • Improve Dashboard processing speed.

New methods added:

self.save_screenshot_to_logs(name=None)  # Link added to Dashboard
"""
Saves a screenshot of the current page to the "latest_logs" folder.
Naming is automatic:
    If NO NAME provided: "_1_screenshot.png", "_2_screenshot.png", etc.
    If NAME IS provided, it becomes: "_1_name.png", "_2_name.png", etc.
(The last_page / failure screenshot is always "screenshot.png")
The screenshot will be in PNG format.
"""

self.wait_for_attribute(selector, attribute, value=None,
                        by=By.CSS_SELECTOR, timeout=None)
"""
Raises an exception if the element attribute/value is not found.
If the value is not specified, the attribute only needs to exist.
Returns the element that contains the attribute if successful.
Default timeout = LARGE_TIMEOUT.
"""

self.assert_attribute(selector, attribute, value=None,
                      by=By.CSS_SELECTOR, timeout=None)
"""
Raises an exception if the element attribute/value is not found.
If the value is not specified, the attribute only needs to exist.
Returns True if successful.
Default timeout = SMALL_TIMEOUT.
"""

self.get_chrome_version()  # If not on Chrome, raise exception

self.get_chromedriver_version()  # If not on Chrome, raise exception

self.is_chromedriver_too_old()  # ("old" means chromedriver < 73)
"""
There are known issues with chromedriver versions below 73.
This can impact tests that need to hover over an element, or ones
that require a custom downloads folder ("./downloaded_files").
Due to the situation that newer versions of chromedriver require
an exact match to the version of Chrome, an "old" version of
chromedriver is installed by default. It is then up to the user
to upgrade to the correct version of chromedriver from there.
This method can be used to change test behavior when trying
to perform an action that is impacted by having an old version
of chromedriver installed.
"""

Prevent duplicate setUp/tearDown; and remove a dependency

24 Apr 06:48
Compare
Choose a tag to compare

Prevent duplicate setUp/tearDown; and remove a dependency

  • Prevent duplicate setUp() and tearDown() calls in the same test:
    -- Resolves #884
  • Remove brython from Python dependencies:
    -- Resolves #886

New methods and commands

22 Apr 03:16
5ab9dff
Compare
Choose a tag to compare

New methods and commands

  • Add a console script for generating boilerplate charts.
  • Add methods for setting and resetting default timeout values.
  • Add open_start_page() method.
  • Add set_content(html_string) method.
  • Add fill(selector, text) method.
  • Add focus(selector) method.
  • Fix an issue with duplicate Highcharts library declarations.
  • Update an error message.
  • Update translations.
  • Update a Python dependency:
    -- virtualenv>=20.4.4.
  • Refactor "base_case.py".

This resolves the following issues: