Skip to content

Commit 0c7de7a

Browse files
committed
Update the docs
1 parent f33dd16 commit 0c7de7a

File tree

4 files changed

+21
-22
lines changed

4 files changed

+21
-22
lines changed

README.md

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,22 +37,9 @@
3737
</p>
3838

3939
<p align="center">
40-
<b>Extends pytest. Simplifies Selenium.</b>
40+
<div align="center"><b>Selenium and pytest in one combined.</b></div>
4141
</p>
42-
43-
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_swag_labs.py"><img src="https://cdn2.hubspot.net/hubfs/100006/images/swag_labs_gif.gif" /></a></p>
44-
45-
```bash
46-
pytest test_swag_labs.py --demo
47-
```
48-
49-
----------
50-
51-
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_swag_labs.py"><img src="https://cdn2.hubspot.net/hubfs/100006/images/swag_mobile.gif" /></a></p>
52-
53-
```bash
54-
pytest test_swag_labs.py --mobile
55-
```
42+
<p align="center"><div align="center"><img src="https://cdn2.hubspot.net/hubfs/100006/images/skype_mobile_test_2.gif" alt="SeleniumBase Mobile Testing" title="SeleniumBase Mobile Testing" /></div></p>
5643

5744
<a id="python_installation"></a>
5845
## <img src="https://seleniumbase.io/img/sb_icon.png" title="SeleniumBase" width="30" /> Get Started
@@ -102,7 +89,16 @@ pytest my_first_test.py
10289
* Chrome is the default browser if not specified with ``--browser=BROWSER``.
10390
* On Linux ``--headless`` is the default behavior (running with no GUI). You can also run in headless mode on any OS. If your Linux machine has a GUI and you want to see the web browser as tests run, add ``--headed`` or ``--gui``.
10491

105-
<b>Here's an example test, [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py):</b>
92+
<b>Run [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) in Demo Mode:</b>
93+
94+
```bash
95+
pytest my_first_test.py --demo
96+
```
97+
98+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/my_first_test_gif.gif" title="SeleniumBase" />
99+
100+
<b>Here's the code for [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py):</b>
101+
106102
```python
107103
from seleniumbase import BaseCase
108104

@@ -121,10 +117,6 @@ class MyTestClass(BaseCase):
121117
self.update_text("input.search-input", "xkcd book\n")
122118
self.assert_exact_text("xkcd: volume 0", "h3")
123119
```
124-
<img src="https://cdn2.hubspot.net/hubfs/100006/images/my_first_test_gif.gif" title="SeleniumBase" />
125-
```bash
126-
pytest my_first_test.py --demo
127-
```
128120

129121
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
130122
* If you're new to CSS Selectors, games like [Flukeout](http://flukeout.github.io/) can help you learn.
@@ -168,7 +160,7 @@ The same command with regular WebDriver is very messy:
168160
```python
169161
from selenium.webdriver.common.by import By
170162
element = self.driver.find_element(by=By.CSS_SELECTOR, value="input")
171-
element.clear() # Not always needed
163+
element.clear()
172164
element.send_keys("dogs")
173165
element.submit()
174166
```

examples/ReadMe.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ pytest my_first_test.py --demo
2626
```
2727
<img src="https://cdn2.hubspot.net/hubfs/100006/images/my_first_test_gif.gif" title="SeleniumBase Demo Mode" /><br />
2828

29+
Run a different example in Demo Mode:
30+
```bash
31+
pytest test_swag_labs.py --demo
32+
```
33+
<img src="https://cdn2.hubspot.net/hubfs/100006/images/swag_labs_gif.gif" /><br />
34+
2935
Run an example test in Headless Mode: (invisible browser)
3036
```bash
3137
pytest my_first_test.py --headless

help_docs/mobile_testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ To find real values for device metrics, [see this GitHub Gist](https://gist.gith
1212
Here's an example of running a mobile test (See https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_skype_site.py):
1313

1414
```bash
15-
pytest test_skype_site.py --mobile --browser=edge
15+
pytest test_skype_site.py --mobile
1616
```
1717
[<img src="https://cdn2.hubspot.net/hubfs/100006/images/skype_mobile_test_2.gif" title="SeleniumBase Mobile Testing">](https://cdn2.hubspot.net/hubfs/100006/images/skype_mobile_test_2.gif)
1818

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ theme:
3232
search_index_only: true
3333
features:
3434
- tabs
35+
- instant
3536
palette:
3637
scheme: default
3738
primary: blue

0 commit comments

Comments
 (0)