SeleniumBase 1.60.0 contains new methods and lots of optimizations.
is very useful because sometimes tests open up a new tab/window, and you need to be able to switch to the newest one easily.
The new assert methods are very useful because now you can assert multiple elements in a single assert statement. (Note the difference between "present" and "visible", as "present" allows for both hidden and visible elements.) The input can either be a list of css selectors, or individual args. Example:
from seleniumbase import BaseCase class MyTestClass(BaseCase): def test_assert_list_of_elements(self): self.open("https://store.xkcd.com/collections/posters") self.assert_elements_present("head", "style", "script") self.assert_elements("h1", "h2", "h3") my_list = ["#top-menu", "#col-main", "#col-widgets"] self.assert_elements(my_list)
Other changes include:
- Allow the use of
URLs when doing link-checking for 404s.
- Optimize Dashboard output and favicon display.
- Update the default version of Geckodriver installed.
- Optimize logging output.
- Optimize some existing methods.
- Update Python dependencies:
Full list of additions, changes, and fixes: