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
<p>All Python methods that start with <code>test_</code> will automatically be run when using <code>pytest</code> or <code>nosetests</code> on a Python file, (<i>or on folders containing Python files</i>). You can also be more specific on what to run within a file by using the following: (<i>Note that the syntax is different for pytest vs nosetests.</i>)</p>
215
+
<p>All Python methods that start with <code>test_</code> will be run automatically when running <code>pytest</code> or <code>nosetests</code> on Python files. You can also be more specific on what to run within a file by using the following: (<i>Note that the syntax is different for pytest vs nosetests.</i>)</p>
<a id="seleniumbase_demo_mode"></a> <b>Use Demo Mode to help you see what tests are asserting.</b>
240
-
241
-
🔵 If the example test is moving too fast for your eyes, you can run it in **Demo Mode** by adding ``--demo`` on the command-line, which pauses the browser briefly between actions, highlights page elements being acted on, and lets you know what test assertions are happening in real time:
237
+
<a id="seleniumbase_demo_mode"></a>
238
+
🔵 You can use **Demo Mode** to help you see what a test is doing: If a test is moving too fast for your eyes, run it in **Demo Mode** by adding ``--demo`` on the command-line, which pauses the browser briefly between actions, highlights page elements being acted on, and displays assertions:
return"Picard Mirror Universe Google Superbowl Ad 2015"
775
774
elif self.is_text_visible("Number One, I've Never Seen Anything Like It.", selector):
776
775
return"Picard Mirror Universe Tesla Superbowl Ad 2015"
776
+
elif self.is_text_visible("Let us make sure history never forgets the name ... Facebook", selector):
777
+
return"Picard Mirror Universe Facebook Superbowl Ad 2015"
777
778
elif self.is_text_visible("""With the first link, the chain is forged.
778
779
The first speech censored, the first thought forbidden,
779
780
the first freedom denied, chains us all irrevocably.""", selector):
780
781
return"Picard Mirror Universe Wikimedia Superbowl Ad 2015"
781
-
elif self.is_text_visible("Let us make sure history never forgets the name ... Facebook", selector):
782
-
return"Picard Mirror Universe Facebook Superbowl Ad 2015"
783
782
else:
784
783
raise Exception("Reports of my assimilation are greatly exaggerated.")
785
784
```
786
785
787
786
🔵 Switching Tabs:
788
787
789
-
<p>What ifyour test opens up a new tab/window and now you have more than one page? No problem. You need to specify which one you currently want Selenium to use. Switching between tabs/windows is easy:</p>
788
+
<p>If your test opens up a new tab/window, you can switch to it. (SeleniumBase automatically switches to new tabs that don't open to ``about:blank`` URLs.)</p>
790
789
791
790
```python
792
791
self.switch_to_window(1) # This switches to the new tab (0 is the first one)
0 commit comments