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
<palign="center"><divalign="center">Python framework for <ahref="https://www.selenium.dev/documentation/"target="_blank">Selenium</a>. Supports <ahref="https://docs.pytest.org/en/stable/"target="_blank">pytest</a> and <ahref="https://behave.readthedocs.io/en/stable/index.html"target="_blank">behave-BDD</a>.</div></p>
11
+
<palign="center"><divalign="center">A Python ecosystem for <ahref="https://www.selenium.dev/documentation/"target="_blank">Selenium</a> that extends <ahref="https://docs.pytest.org/en/stable/"target="_blank">Pytest</a> and <ahref="https://behave.readthedocs.io/en/stable/index.html"target="_blank">Behave</a>.</div></p>
<palign="left">↘️ Example test with the <b>BaseCase</b> class. Runs with <code>pytest</code> or <code>nosetests</code>. (<ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">Learn more</a>)</p>
50
+
<palign="left">🌱 An example with <b>BaseCase</b>, a subclass of <code>unittest.TestCase</code>. Runs with <code>pytest</code> or <code>nosetests</code>. (<ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">Learn more</a>)</p>
51
51
52
52
```python
53
53
from seleniumbase import BaseCase
@@ -64,7 +64,7 @@ class TestMFALogin(BaseCase):
64
64
self.save_screenshot_to_logs()
65
65
```
66
66
67
-
<palign="left">↘️ Example test with the <b>sb</b>pytest fixture. Runs with <code>pytest</code>.</p>
67
+
<palign="left">🌱 An example with <b>sb</b>, a <code>pytest</code> fixture. Runs with <code>pytest</code>.</p>
68
68
69
69
```python
70
70
deftest_mfa_login(sb):
@@ -78,20 +78,20 @@ def test_mfa_login(sb):
78
78
sb.save_screenshot_to_logs()
79
79
```
80
80
81
-
<palign="left">↘️ Example test with <b>behave-BDD</b> <ahref="https://behave.readthedocs.io/en/stable/gherkin.html">Gherkin</a> structure. Runs with <code>behave</code>. (<ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">Learn more</a>)</p>
81
+
<palign="left">🌱 An example with <b>behave-BDD</b> <ahref="https://behave.readthedocs.io/en/stable/gherkin.html">Gherkin</a> structure. Runs with <code>behave</code>. (<ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/behave_bdd/ReadMe.md">Learn more</a>)</p>
82
82
83
83
```gherkin
84
84
Feature: SeleniumBase scenarios for the RealWorld App
85
85
86
-
Scenario: Verify RealWorld App (log in / sign out)
87
-
Given Open "seleniumbase.io/realworld/login"
88
-
When Type "demo_user" into "#username"
89
-
And Type "secret_pass" into "#password"
90
-
And Do MFA "GAXG2MTEOR3DMMDG" into "#totpcode"
91
-
Then Assert exact text "Welcome!" in "h1"
92
-
And Highlight "img#image1"
93
-
And Click 'a:contains("This Page")'
94
-
And Save screenshot to logs
86
+
Scenario: Verify RealWorld App (log in / sign out)
87
+
Given Open "seleniumbase.io/realworld/login"
88
+
When Type "demo_user" into "#username"
89
+
And Type "secret_pass" into "#password"
90
+
And Do MFA "GAXG2MTEOR3DMMDG" into "#totpcode"
91
+
Then Assert exact text "Welcome!" in "h1"
92
+
And Highlight "img#image1"
93
+
And Click 'a:contains("This Page")'
94
+
And Save screenshot to logs
95
95
```
96
96
97
97
<palign="left">✅ An example of running a test: <ahref="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p>
@@ -431,6 +431,8 @@ The code above will leave your browser window open in case there's a failure. (i
431
431
--block-images # (Block images from loading during tests.)
432
432
--verify-delay=SECONDS # (The delay before MasterQA verification checks.)
433
433
--recorder # (Enables the Recorder for turning browser actions into code.)
434
+
--rec-behave # (Same as Recorder Mode, but also generates behave-gherkin.)
435
+
--rec-sleep # (If the Recorder is enabled, also records self.sleep calls.)
434
436
--disable-csp # (Disable the Content Security Policy of websites.)
435
437
--disable-ws # (Disable Web Security on Chromium-based browsers.)
436
438
--enable-ws # (Enable Web Security on Chromium-based browsers.)
(The [behave_bdd/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples/behave_bdd) folder can be found in the [examples/](https://github.com/seleniumbase/SeleniumBase/tree/master/examples) folder.)
0 commit comments