You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -726,29 +726,29 @@ self.click("a.analytics") # Clicks the generated button
726
726
```
727
727
(Due to popular demand, this traffic generation example has been baked into SeleniumBase with the ``self.generate_referral(start_page, end_page)`` and the ``self.generate_traffic(start_page, end_page, loops)`` methods.)
728
728
729
-
<h4>Using delayed asserts:</h4>
729
+
<h4>Using deferred asserts:</h4>
730
730
731
-
Let's say you want to verify multiple different elements on a web page in a single test, but you don't want the test to fail until you verified several elements at once so that you don't have to rerun the test to find more missing elements on the same page. That's where delayed asserts come in. Here's the example:
731
+
Let's say you want to verify multiple different elements on a web page in a single test, but you don't want the test to fail until you verified several elements at once so that you don't have to rerun the test to find more missing elements on the same page. That's where deferred asserts come in. Here's the example:
self.deferred_assert_element('a[name="Super Fake !!!"]') # Will Fail
747
+
self.process_deferred_asserts()
748
748
```
749
749
750
-
``delayed_assert_element()`` and ``delayed_assert_text()`` will save any exceptions that would be raised.
751
-
To flush out all the failed delayed asserts into a single exception, make sure to call ``self.process_delayed_asserts()`` at the end of your test method. If your test hits multiple pages, you can call ``self.process_delayed_asserts()``at the end of all your delayed asserts for a single page. This way, the screenshot from your log file will have the location where the delayed asserts were made.
750
+
``deferred_assert_element()`` and ``deferred_assert_text()`` will save any exceptions that would be raised.
751
+
To flush out all the failed deferred asserts into a single exception, make sure to call ``self.process_deferred_asserts()`` at the end of your test method. If your test hits multiple pages, you can call ``self.process_deferred_asserts()``before navigating to a new page so that the screenshot from your log files matches the URL where the deferred asserts were made.
0 commit comments