<commit_before>[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="220">](https://github.com/seleniumbase/SeleniumBase/)

<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Recorder Mode</h2>

🔴 <b>SeleniumBase Recorder Mode</b> lets you record & export browser actions into automation scripts.<br>

<img src="https://seleniumbase.io/cdn/img/sb_recorder_notification.png" title="SeleniumBase" width="380">

🔴 To activate Recorder Mode, add ``--recorder`` to your ``pytest`` run command when running an existing test on Chrome or Edge. (Also add ``-s`` to allow breakpoints, unless you already have a ``pytest.ini`` file present with ``addopts = --capture=no`` in it.)

```bash
pytest TEST_NAME.py --recorder -s
```

🔴 To add your own actions inside the test, you'll need to create a breakpoint inside your test to activate Debug Mode:

```python
import ipdb; ipdb.set_trace()
```

🔴 You can also activate Debug Mode at the start of your test by adding ``--trace`` as a ``pytest`` command-line option:

```bash
pytest TEST_NAME.py --trace -s
```

🔴 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:

```bash
>>> RECORDING SAVED as: recordings/my_first_test_rec.py
*******************************************************
```<commit_msg>Update the docs<commit_after>[<img src="https://seleniumbase.io/cdn/img/sb_logo_10t.png" title="SeleniumBase" width="220">](https://github.com/seleniumbase/SeleniumBase/)

<h2><img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> Recorder Mode</h2>

🔴 <b>SeleniumBase Recorder Mode</b> lets you record & export browser actions into automation scripts.<br>

<img src="https://seleniumbase.io/cdn/img/sb_recorder_notification.png" title="SeleniumBase" width="380">

🔴 To activate Recorder Mode, add ``--recorder`` to your ``pytest`` run command when running an existing test on Chrome or Edge. (Also add ``-s`` to allow breakpoints, unless you already have a ``pytest.ini`` file present with ``addopts = --capture=no`` in it.)

```bash
pytest TEST_NAME.py --recorder -s
```

🔴 To add your own actions inside the test, you'll need to create a breakpoint inside your test to activate Debug Mode:

```python
import ipdb; ipdb.set_trace()
```

🔴 You can also activate Debug Mode at the start of your test by adding ``--trace`` as a ``pytest`` command-line option:

```bash
pytest TEST_NAME.py --trace --recorder -s
```

🔴 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:

```bash
>>> RECORDING SAVED as: recordings/my_first_test_rec.py
*******************************************************
```
{'fraction_non_alphanumeric': 0.15336904426275727, 'fraction_numerical': 0.007330138144911192, 'mean_word_length': 5.075342465753424, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 25, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1973901', 'n_tokens_mistral': 1083, 'n_tokens_neox': 1049, 'n_words': 423}