Releases: seleniumbase/SeleniumBase
Releases · seleniumbase/SeleniumBase
Add the ability to set the web browser's Language/Locale
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
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
Update the default EdgeDriver version
sbase install edgedriver
will install/download EdgeDriver84.0.522.61
now.- You can always change the version installed:
sbase install edgedriver VERSION
Standardize default starting widths across browsers
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
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
Update Python dependencies, examples, and more
- Update
cffi
andrich
Python dependencies - Set default EdgeDriver version to
84.0.522.59
- Add a presentation that talks about core areas
Fix issue with nosetests tearDown()
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
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:
-- Addtest_tinymce.py
Make logging improvements to the "sb" pytest fixture
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
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
andsetuptools
)