Skip to content

Releases: seleniumbase/SeleniumBase

Add the ability to set the web browser's Language/Locale

20 Aug 07:12
eb56344
Compare
Choose a tag to compare

Add the ability to set the web browser's Language/Locale, and more

Add the ability to set the browser's Language/Locale:

Examples:

  • pytest --locale="ru"
  • pytest --locale="zh_cn"

See https://seleniumbase.io/help_docs/locale_codes/ for a list of valid codes.

Also:

  • Make improvements to JavaScript and jQuery methods
  • Improve error logging

And, add methods for activating and deactivating Chrome's Design Mode

self.activate_design_mode()

self.deactivate_design_mode()

Improve basic logging with date, time, and time-zone info

19 Aug 06:42
ec3f23b
Compare
Choose a tag to compare

Improve basic logging with date, time, and time-zone info

Example basic_test_info.txt file from latest_logs/:

examples.test_fail.MyTestClass.test_find_army_of_robots_on_xkcd_desert_island
----------------------------------------------------
Last Page: https://xkcd.com/731/
  Browser: chrome
Timestamp: 1597818345  (Unix Timestamp)
     Date: Wednesday, August 19, 2020
     Time: 2:25:45 AM  (EST/EDT, UTC-5:00)
----------------------------------------------------
Traceback: File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 615, in run
    testMethod()
  File "/Users/michael/github/SeleniumBase/examples/test_fail.py", line 17, 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 4852, in assert_element
    self.wait_for_element_visible(selector, by=by, timeout=timeout)
  File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/base_case.py", line 3211, in wait_for_element_visible
    self.driver, selector, by, timeout)
  File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/page_actions.py", line 299, in wait_for_element_visible
    timeout_exception(NoSuchElementException, message)
  File "/Users/michael/github/SeleniumBase/seleniumbase/fixtures/page_actions.py", line 117, in timeout_exception
    raise exc(message)
Exception: Message: 
 Element {div#ARMY_OF_ROBOTS} was not present after 1 second!

Update the default EdgeDriver version

18 Aug 17:07
eec27ba
Compare
Choose a tag to compare

Update the default EdgeDriver version

  • sbase install edgedriver will install/download EdgeDriver 84.0.522.61 now.
  • You can always change the version installed: sbase install edgedriver VERSION

Standardize default starting widths across browsers

18 Aug 01:49
b9902b4
Compare
Choose a tag to compare

Standardize default starting widths across browsers

  • Standardized starting widths across different browsers will lead to more consistent results
  • Also upgrade the default GeckoDriver version to v0.27.0

Make improvements to Opera Chromium automation

17 Aug 20:37
a8ac8f2
Compare
Choose a tag to compare

Make improvements to Opera Chromium automation

  • Allow Opera tests to use the same options as Chrome
  • Change the default version of OperaDriver (Chromium)
  • Update lots of docs

Update Python dependencies, examples, and more

16 Aug 01:29
c3ec848
Compare
Choose a tag to compare

Update Python dependencies, examples, and more

  • Update cffi and rich Python dependencies
  • Set default EdgeDriver version to 84.0.522.59
  • Add a presentation that talks about core areas

Fix issue with nosetests tearDown()

15 Aug 01:14
a558b0b
Compare
Choose a tag to compare

Fix issue with nosetests tearDown()

  • Nearly everyone is using pytest with SeleniumBase, so I don't expect that this impacted anyone for the very short time that this issue existed.
  • The v1.46.6 release fix comes only 35 minutes after the release of v1.46.5, which introduced the bug.

Improve error-handling and update Python dependencies

15 Aug 00:41
27ad030
Compare
Choose a tag to compare

Improve error-handling and update Python dependencies

  • Improve error-handling:
    -- Better error messages
  • Update Python dependencies:
    -- wheel>=0.35.1
    -- pytest-cov==2.10.1
    -- pytest-xdist==2.0.0;python_version>="3.5"
    -- allure-pytest==2.8.18
  • Update examples:
    -- Add test_tinymce.py

Make logging improvements to the "sb" pytest fixture

14 Aug 06:22
db1923a
Compare
Choose a tag to compare

Make logging improvements to the sb pytest fixture

  • Fixes pytest html reports with the sb fixture
  • Fixes error logs and screenshots with the sb fixture

Also:

  • Update Python dependencies
  • Update SeleniumBase translations

In case anyone is wondering what the sb fixture is, it's an alternate form of writing SeleniumBase tests.
Instead of calling from SeleniumBase import BaseCase, you can pass the sb fixture directly through test methods, which gain access to all SeleniumBase methods.

Example usage:

import pytest

@pytest.mark.parametrize('value', ["pytest", "selenium"])
def test_sb_fixture_with_no_class(sb, value):
    sb.open("https://google.com/ncr")
    sb.type('input[title="Search"]', value + '\n')
    sb.assert_text(value, "div#center_col")

class Test_SB_Fixture():
    @pytest.mark.parametrize('value', ["pytest", "selenium"])
    def test_sb_fixture_inside_class(self, sb, value):
        sb.open("https://google.com/ncr")
        sb.type('input[title="Search"]', value + '\n')
        sb.assert_text(value, "div#center_col")

Improve Safari automation, Demo Mode, and Slow Mode

13 Aug 07:52
b07e065
Compare
Choose a tag to compare

Improve Safari automation, Demo Mode, and Slow Mode

  • Improve Safari automation
  • Improve Demo Mode
  • Improve Slow Mode
  • Add post_message_and_highlight()
  • Add and update example tests
  • Update Python dependencies (pip and setuptools)