Skip to content

Commit e97a61d

Browse files
committed
Update the docs
1 parent 86bf5d9 commit e97a61d

File tree

2 files changed

+95
-67
lines changed

2 files changed

+95
-67
lines changed

README.md

Lines changed: 67 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
<link rel="icon" href="https://seleniumbase.io/img/logo6.png" />
77

88
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/">
9-
<img src="https://seleniumbase.io/cdn/img/sb_logo_gs.png" alt="SeleniumBase" title="SeleniumBase" width="500" /></a></p>
9+
<img src="https://seleniumbase.io/cdn/img/sb_logo_gs.png" alt="SeleniumBase" title="SeleniumBase" width="450" /></a></p>
1010
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/releases">
11-
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=00a0c0" alt="Latest Release on GitHub" /></a> <a href="https://pypi.org/project/seleniumbase/">
11+
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=0090c0" alt="Latest Release on GitHub" /></a> <a href="https://pypi.org/project/seleniumbase/">
1212
<img src="https://img.shields.io/pypi/v/seleniumbase.svg?color=00a0e0" alt="Latest Release on PyPI" /></a></p>
1313
<p align="center">
14-
<b>End-to-end testing for the next generation.</b>
14+
<b>A complete end-to-end testing experience.</b>
1515
</p>
1616

1717
<!-- View on GitHub -->
@@ -21,38 +21,42 @@
2121
<img src="https://img.shields.io/badge/docs-%20seleniumbase.io-22BBAA.svg" alt="SeleniumBase.io Docs" /></a></p>
2222

2323
<p>
24-
SeleniumBase is a Python framework for fast and reliable web automation and testing.
25-
Tests are run with "pytest". Browsers are controlled by WebDriver.
24+
SeleniumBase is an all-in-one Python framework for automated browser testing.
25+
Tests are run with "pytest", and use WebDriver APIs for web-page interaction.
2626
</p>
2727

2828
<p align="center">
2929
<a href="#python_installation">🚀 Start</a> |
3030
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/features_list.md">🗂️ Features</a> |
3131
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md">🖥️ CLI</a> |
32-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📖 Examples</a> |
32+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/ReadMe.md">📖 Examples</a>
33+
<br />
3334
<a href="https://github.com/seleniumbase/SeleniumBase/tree/master/examples/boilerplates">♻️ Boilerplates</a> |
3435
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/locale_codes.md">🗾 Locales</a> |
3536
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/js_package_manager.md">🗄️ PkgManager</a>
3637
<br />
3738
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/method_summary.md">📗 API</a> |
3839
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">📋 Reports</a> |
3940
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/console_scripts/ReadMe.md">💻 Scripts</a> |
40-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a> |
41-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">🔡 Syntax Formats</a> |
42-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 Grid Hub</a> |
41+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/mobile_testing.md">📱 Mobile</a>
42+
<br />
43+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/syntax_formats.md">🔡 SyntaxFormats</a> |
44+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md">🌐 GridHub</a> |
4345
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_ide/ReadMe.md">⏺️ Recorder</a>
4446
<br />
4547
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/github/workflows/ReadMe.md">🤖 CI</a> |
4648
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/translations.md">🌏 Translate</a> |
4749
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/tour_examples/ReadMe.md">🗺️ Tours</a> |
48-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ VisualTest</a> |
50+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/visual_testing/ReadMe.md">🖼️ VisualTest</a>
51+
<br />
4952
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/ReadMe.md">📑 Presenter</a> |
5053
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/ReadMe.md">📊 ChartMaker</a> |
5154
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/master_qa/ReadMe.md">🛂 MasterQA</a>
5255
</p>
5356

54-
✅ Fast setup: All you need is [Python](https://www.python.org/downloads/)! 🐍<br />
55-
✅ Includes [reporting & dashboard tools](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md).<br />
57+
✅ Simple setup steps with [Python](https://www.python.org/downloads/) and [Git](https://git-scm.com/).<br />
58+
✅ Chrome/Edge/Firefox/IE/Opera/Safari.<br />
59+
✅ Includes [reporting and dashboard tools](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md).
5660

5761
--------
5862

@@ -64,6 +68,29 @@ pytest my_first_test.py --demo
6468

6569
<p align="left"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.io/cdn/gif/my_first_test_4.gif" alt="SeleniumBase Demo Mode" title="SeleniumBase Demo Mode" /></a></p>
6670

71+
```python
72+
from seleniumbase import BaseCase
73+
74+
class MyTestClass(BaseCase):
75+
76+
def test_basics(self):
77+
url = "https://store.xkcd.com/collections/posters"
78+
self.open(url)
79+
self.type('input[name="q"]', "xkcd book")
80+
self.click('input[value="Search"]')
81+
self.assert_text("xkcd: volume 0", "h3")
82+
self.open("https://xkcd.com/353/")
83+
self.assert_title("xkcd: Python")
84+
self.assert_element('img[alt="Python"]')
85+
self.click('a[rel="license"]')
86+
self.assert_text("free to copy and reuse")
87+
self.go_back()
88+
self.click_link("About")
89+
self.assert_exact_text("xkcd.com", "h2")
90+
```
91+
92+
--------
93+
6794
<a id="python_installation"></a>
6895
<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Python Setup:</h2>
6996

@@ -182,32 +209,9 @@ pytest my_first_test.py --demo
182209
183210
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.io/cdn/gif/my_first_test_4.gif" alt="SeleniumBase Demo Mode" title="SeleniumBase Demo Mode" /></a>
184211
185-
<b>Here's the code for [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py):</b>
186-
187-
```python
188-
from seleniumbase import BaseCase
189-
190-
class MyTestClass(BaseCase):
191-
192-
def test_basics(self):
193-
url = "https://store.xkcd.com/collections/posters"
194-
self.open(url)
195-
self.type('input[name="q"]', "xkcd book")
196-
self.click('input[value="Search"]')
197-
self.assert_text("xkcd: volume 0", "h3")
198-
self.open("https://xkcd.com/353/")
199-
self.assert_title("xkcd: Python")
200-
self.assert_element('img[alt="Python"]')
201-
self.click('a[rel="license"]')
202-
self.assert_text("free to copy and reuse")
203-
self.go_back()
204-
self.click_link("About")
205-
self.assert_exact_text("xkcd.com", "h2")
206-
```
207-
208212
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
209213
* If you're new to CSS Selectors, games like [Flukeout](http://flukeout.github.io/) can help you learn.
210-
* Here are some common ``SeleniumBase`` methods you might find in tests:
214+
* Here are some common ``SeleniumBase`` methods that you might find in tests:
211215
212216
```python
213217
self.open(URL) # Navigate to the web page
@@ -426,23 +430,28 @@ sbase mkdir ui_tests
426430
427431
```bash
428432
ui_tests/
433+
429434
├── __init__.py
430-
├── boilerplates/
431-
│ ├── __init__.py
432-
│ ├── base_test_case.py
433-
│ ├── boilerplate_test.py
434-
│ ├── classic_obj_test.py
435-
│ ├── page_objects.py
436-
│ └── samples/
437-
│ ├── __init__.py
438-
│ ├── google_objects.py
439-
│ └── google_test.py
440435
├── my_first_test.py
441436
├── parameterized_test.py
442437
├── pytest.ini
443438
├── requirements.txt
444439
├── setup.cfg
445-
└── test_demo_site.py
440+
├── test_demo_site.py
441+
└── boilerplates/
442+
443+
├── __init__.py
444+
├── base_test_case.py
445+
├── boilerplate_test.py
446+
├── classic_obj_test.py
447+
├── page_objects.py
448+
├── sb_fixture_test.py
449+
└── samples/
450+
451+
├── __init__.py
452+
├── google_objects.py
453+
├── google_test.py
454+
└── swag_labs_test.py
446455
```
447456
448457
<b>ProTip™:</b> You can also create a boilerplate folder without any sample tests in it by adding ``-b`` or ``--basic`` to the ``sbase mkdir`` command:
@@ -455,6 +464,7 @@ sbase mkdir ui_tests --basic
455464
456465
```bash
457466
ui_tests/
467+
458468
├── __init__.py
459469
├── pytest.ini
460470
├── requirements.txt
@@ -790,22 +800,24 @@ is_text_visible(text, selector) # is text visible on a page
790800
```python
791801
def get_mirror_universe_captain_picard_superbowl_ad(superbowl_year):
792802
selector = "div.superbowl_%s div.commercials div.transcript div.picard" % superbowl_year
793-
if self.is_text_visible("For the Love of Marketing and Earl Grey Tea!", selector):
794-
return "Picard HubSpot Superbowl Ad 2015"
803+
if self.is_text_visible("Yes, it was I who summoned you all here.", selector):
804+
return "Picard Paramount+ Superbowl Ad 2020"
805+
elif self.is_text_visible("For the Love of Marketing and Earl Grey Tea!", selector):
806+
return "Picard Mirror Universe HubSpot Superbowl Ad 2015"
795807
elif self.is_text_visible("Delivery Drones... Engage", selector):
796-
return "Picard Amazon Superbowl Ad 2015"
808+
return "Picard Mirror Universe Amazon Superbowl Ad 2015"
797809
elif self.is_text_visible("Bing it on Screen!", selector):
798-
return "Picard Microsoft Superbowl Ad 2015"
810+
return "Picard Mirror Universe Microsoft Superbowl Ad 2015"
799811
elif self.is_text_visible("OK Glass, Make it So!", selector):
800-
return "Picard Google Superbowl Ad 2015"
812+
return "Picard Mirror Universe Google Superbowl Ad 2015"
801813
elif self.is_text_visible("Number One, I've Never Seen Anything Like It.", selector):
802-
return "Picard Tesla Superbowl Ad 2015"
814+
return "Picard Mirror Universe Tesla Superbowl Ad 2015"
803815
elif self.is_text_visible("""With the first link, the chain is forged.
804816
The first speech censored, the first thought forbidden,
805817
the first freedom denied, chains us all irrevocably.""", selector):
806-
return "Picard Wikimedia Superbowl Ad 2015"
818+
return "Picard Mirror Universe Wikimedia Superbowl Ad 2015"
807819
elif self.is_text_visible("Let us make sure history never forgets the name ... Facebook", selector):
808-
return "Picard Facebook Superbowl Ad 2015"
820+
return "Picard Mirror Universe Facebook Superbowl Ad 2015"
809821
else:
810822
raise Exception("Reports of my assimilation are greatly exaggerated.")
811823
```

seleniumbase/console_scripts/ReadMe.md

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,24 +71,40 @@ and Python boilerplates for setting up customized
7171
test frameworks.
7272

7373
```bash
74-
.
74+
ui_tests/
75+
7576
├── __init__.py
76-
├── boilerplates/
77-
│ ├── __init__.py
78-
│ ├── base_test_case.py
79-
│ ├── boilerplate_test.py
80-
│ ├── classic_obj_test.py
81-
│ ├── page_objects.py
82-
│ └── samples/
83-
│ ├── __init__.py
84-
│ ├── google_objects.py
85-
│ └── google_test.py
8677
├── my_first_test.py
8778
├── parameterized_test.py
8879
├── pytest.ini
8980
├── requirements.txt
9081
├── setup.cfg
91-
└── test_demo_site.py
82+
├── test_demo_site.py
83+
└── boilerplates/
84+
85+
├── __init__.py
86+
├── base_test_case.py
87+
├── boilerplate_test.py
88+
├── classic_obj_test.py
89+
├── page_objects.py
90+
├── sb_fixture_test.py
91+
└── samples/
92+
93+
├── __init__.py
94+
├── google_objects.py
95+
├── google_test.py
96+
└── swag_labs_test.py
97+
```
98+
99+
If running with the ``-b`` or ``--basic`` option:
100+
101+
```bash
102+
ui_tests/
103+
104+
├── __init__.py
105+
├── pytest.ini
106+
├── requirements.txt
107+
└── setup.cfg
92108
```
93109

94110
### mkfile

0 commit comments

Comments
 (0)