Skip to content

Commit e27163f

Browse files
authored
Merge pull request #994 from seleniumbase/recorder-mode-algorithms
Updates to Recorder Mode and the Page Objects generator
2 parents df5e519 + ab1e0cc commit e27163f

File tree

11 files changed

+337
-14
lines changed

11 files changed

+337
-14
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
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/logo6.png" />
77

8-
<h2 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="248" /></a></h2>
9-
<h4 align="center">Fast and reliable testing for web apps.</h4>
8+
<h2 align="center"><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.io/cdn/img/sb_banner_t.png" alt="SeleniumBase" title="SeleniumBase" width="590" /></a></h2>
9+
<h4 align="center">Create web & mobile tests 10x faster.</h4>
1010
<p align="center"><a href="https://github.com/seleniumbase/SeleniumBase/releases">
1111
<img src="https://img.shields.io/github/v/release/seleniumbase/SeleniumBase.svg?color=2277EE" 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> <a href="https://pepy.tech/project/seleniumbase">
@@ -18,7 +18,7 @@
1818
<img src="https://badges.gitter.im/seleniumbase/SeleniumBase.svg" alt="SeleniumBase" /></a> <a href="https://seleniumbase.io">
1919
<img src="https://img.shields.io/badge/docs-%20seleniumbase.io-22BBAA.svg" alt="SeleniumBase.io Docs" /></a></p>
2020

21-
<p align="center">SeleniumBase is a complete framework for web automation and end-to-end testing with <a href="https://docs.pytest.org/en/latest/index.html">pytest</a>.<br />The API simplifies <a href="https://www.selenium.dev/documentation/">Selenium</a>'s out-of-the-box API, leading to tests with more maintainable code. <br />SeleniumBase includes advanced features such as a realtime <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">Dashboard</a>, a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder</a>, and more.</p>
21+
<p align="center">SeleniumBase is a complete framework for web automation & end-to-end testing with <a href="https://docs.pytest.org/en/latest/index.html">pytest</a>.<br />The API simplifies <a href="https://www.selenium.dev/documentation/">Selenium</a>'s out-of-the-box API, which leads to more maintainable test code. <br />SeleniumBase includes advanced features such as a realtime <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/example_logs/ReadMe.md">Dashboard</a>, a <a href="https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/recorder_mode.md">Recorder</a>, & more.</p>
2222

2323
<p align="center">
2424
<a href="#python_installation">🚀 Start</a> |
@@ -65,7 +65,7 @@
6565
pytest my_first_test.py --demo
6666
```
6767

68-
<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>
68+
<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_2.gif" width="480" alt="SeleniumBase Demo Mode" title="SeleniumBase Demo Mode" /></a></p>
6969

7070
```python
7171
from seleniumbase import BaseCase
@@ -190,7 +190,7 @@ pytest test_demo_site.py
190190
191191
> (Chrome is the default browser if not specified with ``--browser=BROWSER``. On Linux, ``--headless`` is the default behavior. 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``.)
192192
193-
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py"><img src="https://seleniumbase.io/cdn/gif/demo_page_1.gif" title="SeleniumBase Demo Page" width="450" /></a><br />
193+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/test_demo_site.py"><img src="https://seleniumbase.io/cdn/gif/demo_page_2.gif" title="SeleniumBase Demo Page" width="450" /></a><br />
194194
195195
🔵 <b>Here are more examples that you can run:</b>
196196
@@ -206,7 +206,7 @@ pytest test_swag_labs.py
206206
pytest my_first_test.py --demo
207207
```
208208
209-
<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>
209+
<a href="https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py"><img src="https://seleniumbase.io/cdn/gif/my_first_test_2.gif" alt="SeleniumBase Demo Mode" title="SeleniumBase Demo Mode" /></a>
210210
211211
* By default, **[CSS Selectors](https://www.w3schools.com/cssref/css_selectors.asp)** are used for finding page elements.
212212
* If you're new to CSS Selectors, games like [CSS Diner](http://flukeout.github.io/) can help you learn.

docs/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ importlib-metadata==4.8.1;python_version>="3.6"
1818
bleach==4.1.0
1919
lunr==0.6.0;python_version>="3.6"
2020
nltk==3.6.4;python_version>="3.6"
21-
watchdog==2.1.5;python_version>="3.6"
21+
watchdog==2.1.6;python_version>="3.6"
2222
mkdocs==1.2.2;python_version>="3.6"
2323
mkdocs-material==7.3.0;python_version>="3.6"
2424
mkdocs-exclude-search==0.5.2;python_version>="3.6"

examples/ReadMe.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ Run an example test in Demo Mode: (highlight assertions)
3434
pytest my_first_test.py --demo
3535
```
3636

37-
<img src="https://seleniumbase.io/cdn/gif/my_first_test_4.gif" title="SeleniumBase Demo Mode" /><br />
37+
<img src="https://seleniumbase.io/cdn/gif/my_first_test_2.gif" title="SeleniumBase Demo Mode" /><br />
3838

3939
Run a different example in Demo Mode:
4040

4141
```bash
4242
pytest test_swag_labs.py --demo
4343
```
4444

45-
<img src="https://seleniumbase.io/cdn/gif/swag_demo_2.gif" /><br />
45+
<img src="https://seleniumbase.io/cdn/gif/swag_demo_3.gif" /><br />
4646

4747
Run an example test in Headless Mode: (invisible browser)
4848

@@ -70,7 +70,7 @@ Run a test on the Demo Site to try many SeleniumBase methods:
7070
pytest test_demo_site.py
7171
```
7272

73-
<img src="https://seleniumbase.io/cdn/gif/demo_page_1.gif" title="SeleniumBase Demo Page" /><br />
73+
<img src="https://seleniumbase.io/cdn/gif/demo_page_2.gif" title="SeleniumBase Demo Page" /><br />
7474

7575
Run tests multi-threaded using [n] threads:
7676

@@ -160,6 +160,12 @@ For more advanced run commands, such as using a proxy server, see [../help_docs/
160160

161161
--------
162162

163+
If you just need to perform some quick website verification on various devices, you can use the <a href="https://seleniumbase.io/devices/">SeleniumBase Device Farm</a>. Just plug in a website URL, and it will display how the website looks on four different devices:
164+
165+
<a href="https://seleniumbase.io/devices/"><img src="https://seleniumbase.io/cdn/img/github_demo.png" width="540" title="SeleniumBase Mobile Mode" /></a><br />
166+
167+
--------
168+
163169
To make things easier, here's a simple GUI program that allows you to run a few example tests by pressing a button:
164170

165171
```bash

help_docs/recorder_mode.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@
1212
pytest TEST_NAME.py --recorder -s
1313
```
1414

15-
🔴 To add your own actions inside the test, you'll need to create a breakpoint somewhere inside of it:
15+
🔴 To add your own actions inside the test, you'll need to create a breakpoint inside your test to activate Debug Mode:
1616

1717
```python
1818
import ipdb; ipdb.set_trace()
1919
```
2020

21+
🔴 You can also activate Debug Mode at the start of your test by adding ``--trace`` as a ``pytest`` command-line option:
22+
23+
```bash
24+
pytest TEST_NAME.py --trace -s
25+
```
26+
2127
🔴 Once you've reached the breakpoint, you can take control of the browser and add in any actions that you want recorded. When you are finished recording, type "``c``" on the command-line and press ``[Enter]`` to let the test continue from the breakpoint. After the test completes, a file called ``TEST_NAME_rec.py`` will be automatically created in the ``./recordings`` folder, which will include the actions performed by the test, and the manual actions that you added in. Below is a command-line notification:
2228

2329
```bash
@@ -64,6 +70,8 @@ class RecorderTest(BaseCase):
6470

6571
<p>🔴 SeleniumBase <code>1.66.5</code> improves the algorithm for converting recorded actions into SeleniumBase code.</p>
6672

73+
<p>🔴 SeleniumBase <code>1.66.6</code> adds more selector options and improves the algorithm for converting recorded actions into SeleniumBase code.</p>
74+
6775
--------
6876

6977
<div>To learn more about SeleniumBase, check out the Docs Site:</div>

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ packaging>=21.0;python_version>="3.6"
55
typing-extensions>=3.10.0.2
66
setuptools>=44.1.1;python_version<"3.5"
77
setuptools>=50.3.2;python_version>="3.5" and python_version<"3.6"
8-
setuptools>=58.1.0;python_version>="3.6"
8+
setuptools>=58.2.0;python_version>="3.6"
99
setuptools-scm==5.0.2;python_version<"3.6"
1010
setuptools-scm>=6.3.2;python_version>="3.6"
1111
tomli>=1.2.1;python_version>="3.6"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "1.66.5"
2+
__version__ = "1.66.6"

0 commit comments

Comments
 (0)