github seleniumbase/SeleniumBase v1.3.26
Improve the check_assert system

latest releases: v4.26.3, v4.26.2, v4.26.1...
6 years ago

The check_assert system may have been confusing to SeleniumBase users. It was built to allow a test to make multiple assertions on a page without raising any test failures until all desired check_asserts were called and then self.process_checks() called after that.

The check_asserts include self.check_assert_element() and self.check_assert_text().

Rather than fail a test immediately after the first assertion failure, the test failure is delayed until later when more assertions have been made. The issue arose when SeleniumBase users called the check_assert methods in their tests without calling self.process_checks() afterward. This led to tests that had failed assertions that were never raised at the end of the test, giving the test a Pass instead of a Fail when it should be failing. Now, self.process_checks() will automatically get called in the tearDown() phase at the end of each test if there are any check_assert exceptions that were never raised by a self.process_checks() call from inside the test, assuming that the end of the test is reached without any other exceptions getting raised, such as ones from all the regular assert statements.

Don't miss a new SeleniumBase release

NewReleases is sending notifications on new releases.