Skip to content

Commit a0f3a95

Browse files
committed
Update the ReadMe
1 parent aa806de commit a0f3a95

File tree

1 file changed

+26
-7
lines changed

1 file changed

+26
-7
lines changed

README.md

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<meta property="og:image" content="https://seleniumbase.github.io/cdn/img/mac_sb_logo_5b.png" />
88
<link rel="icon" href="https://seleniumbase.github.io/img/logo7.png" />
99

10-
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/mac_sb_logo_b.png" alt="SeleniumBase" title="SeleniumBase" width="408" /></a></h3>
10+
<h3 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" alt="SeleniumBase" title="SeleniumBase" width="350" /></a></h3>
1111

12-
<h2 align="center">SeleniumBase: Enterprise Python Web Testing</h2>
12+
<h2 align="center">Python Web UI Testing Framework</h2>
1313

1414
<p align="center"><a href="https://pypi.python.org/pypi/seleniumbase" target="_blank"><img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=3399EE" alt="PyPI version" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/releases" target="_blank"><img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=22AAEE" alt="GitHub version" /></a> <a href="https://seleniumbase.io"><img src="https://img.shields.io/badge/docs-seleniumbase.io-11BBAA.svg" alt="SeleniumBase Docs" /></a> <a href="https://github.com/seleniumbase/SeleniumBase/actions" target="_blank"><img src="https://github.com/seleniumbase/SeleniumBase/workflows/CI%20build/badge.svg" alt="SeleniumBase GitHub Actions" /></a> <a href="https://gitter.im/seleniumbase/SeleniumBase" target="_blank"><img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a></p>
1515

@@ -24,7 +24,7 @@
2424
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📘 APIs</a> |
2525
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md"> 🔡 Formats</a> |
2626
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📊 Dashboard</a> |
27-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">⏺️ Recorder</a> |
27+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">🔴 Recorder</a> |
2828
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
2929
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid</a>
3030
<br />
@@ -53,23 +53,42 @@
5353

5454
--------
5555

56-
5756
<a id="multiple_examples"></a>
58-
<p align="left"><b>Example:</b> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a> from <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples" target="_blank">SeleniumBase/examples/</a></p>
57+
<p align="left"><b>Example:</b> <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_coffee_cart.py" target="_blank">test_coffee_cart.py</a> from <a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples" target="_blank">./examples/</a></p>
5958

6059
```bash
6160
cd examples/
6261
pytest test_coffee_cart.py --demo
6362
```
6463

65-
<p>(<code>--demo</code> slows the test with highlighting for better visibility.)</p>
64+
<p>(<code>--demo</code> mode slows down tests and highlights actions)</p>
6665

6766
<p align="left"><a href="https://seleniumbase.io/demo_page" target="_blank"><img src="https://seleniumbase.github.io/cdn/gif/coffee_cart.gif" width="480" alt="SeleniumBase Example" title="SeleniumBase Example" /></a></p>
6867

68+
* Here's a preview of that test:
69+
70+
```python
71+
from seleniumbase import BaseCase
72+
73+
class CoffeeCartTest(BaseCase):
74+
def test_coffee_cart(self):
75+
self.open("https://seleniumbase.io/coffee/")
76+
self.click('div[data-sb="Cappuccino"]')
77+
self.click('div[data-sb="Flat-White"]')
78+
self.click('div[data-sb="Cafe-Latte"]')
79+
self.click('a[aria-label="Cart page"]')
80+
self.assert_exact_text("Total: $53.00", "button.pay")
81+
self.click("button.pay")
82+
self.type("input#name", "Selenium Coffee")
83+
self.type("input#email", "[email protected]")
84+
self.click("button#submit-payment")
85+
self.assert_text("Thanks for your purchase.", "#app")
86+
```
87+
6988
--------
7089

7190
<details>
72-
<summary> ▶️ How is SeleniumBase different from raw Selenium? (<b>click to expand</b>)</summary>
91+
<summary> ▶️ How is <b>SeleniumBase</b> different from raw Selenium? (<b>click to expand</b>)</summary>
7392
<div>
7493

7594
<p>💡 SeleniumBase is a Python framework for browser automation and testing. SeleniumBase uses <a href="https://www.w3.org/TR/webdriver2/#endpoints" target="_blank">Selenium/WebDriver</a> APIs, and incorporates test-runners such as <code>pytest</code>, <code>nosetests</code>, and <code>behave</code> to provide organized structure, test discovery, test execution, test state (<i>eg. passed, failed, or skipped</i>), and command-line options for changing default settings (<i>such as choosing the browser to use</i>). With raw Selenium, you would need to set up your own options-parser for configuring tests from the command-line.</p>

0 commit comments

Comments
 (0)