Skip to content

Commit 5ac952d

Browse files
committed
Update the ReadMe
1 parent 093a615 commit 5ac952d

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

README.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
<meta property="og:image" content="https://seleniumbase.io/cdn/img/mac_sb_logo_5.png" />
66
<link rel="icon" href="https://seleniumbase.io/img/green_logo.png" />
77

8-
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/mac_sb_logo_9.png" alt="SeleniumBase" title="SeleniumBase" width="308" /></a></h3>
8+
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/mac_sb_logo_8.png" alt="SeleniumBase" title="SeleniumBase" width="310" /></a></h3>
99
<!-- View on GitHub -->
10-
<h4 align="center">Better Web Testing with <a href="https://www.selenium.dev/documentation/" target="_blank">Selenium</a> and <a href="https://docs.pytest.org/en/stable/" target="_blank">Pytest</a>.</h4>
10+
<h4 align="center">Better Web Testing with <a href="https://www.selenium.dev/documentation/" target="_blank">Selenium</a> and <a href="https://docs.pytest.org/en/stable/" target="_blank">pytest</a>.</h4>
1111
<p align="center">
1212
<a href="https://github.com/seleniumbase/SeleniumBase/releases">
1313
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" alt="Latest Release on GitHub" /></a> <a href="https://pypi.python.org/pypi/seleniumbase" target="_blank">
@@ -45,36 +45,38 @@
4545

4646
--------
4747

48-
<p align="left"> An example test using the <code>BaseCase</code> class:</p>
48+
<p align="left">🔵 An example test using the <code>BaseCase</code> class:</p>
4949

5050
```python
5151
from seleniumbase import BaseCase
5252

53-
class Test_MFA_Login(BaseCase):
53+
class TestMFALogin(BaseCase):
5454
def test_mfa_login(self):
5555
self.open("https://seleniumbase.io/realworld/login")
56-
self.type("input#username", "demo_user")
57-
self.type("input#password", "secret_pass")
56+
self.type("#username", "demo_user")
57+
self.type("#password", "secret_pass")
5858
self.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG")
59-
self.click('a:contains("This Page")')
59+
self.assert_element("img#image1")
6060
self.assert_text("Welcome!", "h1")
61+
self.click('a:contains("This Page")')
6162
self.save_screenshot_to_logs()
6263
```
6364

64-
<p align="left"> An example test using the <code>sb</code> fixture:</p>
65+
<p align="left">🔵 An example test using the <code>sb</code> pytest fixture:</p>
6566

6667
```python
6768
def test_mfa_login(sb):
6869
sb.open("https://seleniumbase.io/realworld/login")
69-
sb.type("input#username", "demo_user")
70-
sb.type("input#password", "secret_pass")
70+
sb.type("#username", "demo_user")
71+
sb.type("#password", "secret_pass")
7172
sb.enter_mfa_code("#totpcode", "GAXG2MTEOR3DMMDG")
72-
sb.click('a:contains("This Page")')
73+
sb.assert_element("img#image1")
7374
sb.assert_text("Welcome!", "h1")
75+
sb.click('a:contains("This Page")')
7476
sb.save_screenshot_to_logs()
7577
```
7678

77-
<p align="left"> An example of running a test: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p>
79+
<p align="left">🔵 An example of running a test: <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py">test_demo_site.py</a></p>
7880

7981
```bash
8082
cd examples/

0 commit comments

Comments
 (0)