Releases: seleniumbase/SeleniumBase
Update seleniumbase console scripts (add "download" command)
Update seleniumbase console scripts
Adding:
seleniumbase download server
This command downloads the latest Selenium Server Standalone JAR file from https://www.seleniumhq.org/download/
Add click_visible_elements(selector) method
Add click_visible_elements(selector) method
Finds all matching page elements and clicks visible ones in order.
If a click reloads or opens a new page, the clicking will stop.
Works best for actions such as clicking all checkboxes on a page.
Example:
self.click_visible_elements('input[type="checkbox"]')
Add method/option to check for JavaScript errors on page loads
(Works ONLY for Chrome (non-headless) and Chrome-based browsers such as Opera right now.)
Add method/option to check for JavaScript errors on page loads:
- New method:
self.assert_no_js_errors()
- New command line option (to automatically check for JavaScript errors after every page load):
--check_js
Ex:
pytest my_first_test.py --browser=chrome --check_js
Update the Selenium IDE script converter tool
Update the Selenium IDE script converter tool
Set default selector to ``html`` for text-search methods.
Set default selector to html
for text-search methods.
(It's also optional now.)
Now you can do something like this:
self.assert_text("SOME TEXT")
instead of this:
self.assert_text("SOME TEXT", "html")
(Default selector type for selectors: by=By.CSS_SELECTOR
)
Methods effected:
assert_text
is_text_visible
wait_for_text
find_text
delayed_assert_text
wait_for_text_visible
assert_text_visible
Due to keeping backwards compatibility, a few older methods remain that do the same thing as newer methods. (Method names were shortened from their previous versions.)
Remote desired capabilities
Remote desired capabilities
Allow users to specify browser desired capabilities for webdriver when running SeleniumBase tests on a remote SeleniumGrid server such as BrowserStack, Sauce Labs, or TestingBot.
A sample run command may look like this: (When run from the SeleniumBase/examples/
folder):
pytest my_first_test.py --browser=remote --server=username:[email protected] --port=80 --cap_file=capabilities/sample_cap_file_BS.py
A regex parser was built into SeleniumBase to capture all lines from the specified desired capabilities file in the following formats:
'KEY': 'VALUE'
caps['KEY'] = "VALUE"
(Each pair must be on a separate line. You can interchange single and double quotes.)
You can also swap --browser=remote
with an actual browser, eg --browser=chrome
, which will combine the default SeleniumBase desired capabilities with those that were specified in the capabilities file when using --cap_file=FILE.py
. (For example, you'll need default SeleniumBase desired capabilities when using a proxy server, which is not the same as the Selenium Grid server.)
Fix edge case with BaseCase tearDown() method
Fix edge case with BaseCase tearDown() method
- If running tests with
--pdb
, tests would fail if there were no errors. Now fixed.
Upgrade selenium, pytest, urllib3, and pyotp
Upgrade selenium, pytest, urllib3, and pyotp
Upgrade flake8 version and make fixes based on it
Upgrade flake8 version and make fixes based on it
MasterQA Updates
MasterQA Updates
- Edit Theme
- Improve Reliability