You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**``pip`` already comes with Python!** (It lets you install packages, such as ``seleniumbase``.)
19
+
**`pip` already comes with Python!** (It lets you install packages, such as `seleniumbase`.)
20
20
21
-
⚠️ If something went wrong with your ``pip`` installation, try this:
21
+
⚠️ If something went wrong with your `pip` installation, try this:
22
22
23
23
```zsh
24
24
python -m ensurepip --default-pip
@@ -30,7 +30,7 @@ If your existing version of pip is old, upgrade to the latest version:
30
30
python -m pip install --upgrade pip setuptools
31
31
```
32
32
33
-
On CentOS 7 and some versions of Linux, you may need to install pip with ``yum``:
33
+
On CentOS 7 and some versions of Linux, you may need to install pip with `yum`:
34
34
35
35
```zsh
36
36
yum -y update
@@ -39,7 +39,7 @@ yum -y install python-pip
39
39
40
40
If you're having any trouble getting pip, you can [GET PIP HERE](https://pip.pypa.io/en/latest/installation/).
41
41
42
-
When done, make sure the location of pip is on your path, which is ``$PATH`` for macOS/Linux. (On Windows, it's the System Variables ``Path`` within System Environment Variables.)
42
+
When done, make sure the location of pip is on your path, which is `$PATH` for macOS/Linux. (On Windows, it's the System Variables `Path` within System Environment Variables.)
* (Depending on your user permissions, you may need to add ``--user`` to the command if you're not inside a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md), or use "[sudo](https://en.wikipedia.org/wiki/Sudo)" on a UNIX-based OS if you're getting errors during installation.)
58
+
* (Depending on your user permissions, you may need to add `--user` to the command if you're not inside a [Python virtual environment](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/virtualenv_instructions.md), or use "[sudo](https://en.wikipedia.org/wiki/Sudo)" on a UNIX-based OS if you're getting errors during installation.)
Copy file name to clipboardExpand all lines: help_docs/mobile_testing.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
<h2><ahref="https://github.com/seleniumbase/SeleniumBase/"><imgsrc="https://seleniumbase.github.io/img/logo6.png"title="SeleniumBase"width="32"></a> Mobile Mode / Mobile Testing</h2>
4
4
5
-
Use ``--mobile`` to run SeleniumBase tests using Chrome's mobile device emulator with default values for Device Metrics and User-Agent.
5
+
Use `--mobile` to run SeleniumBase tests using Chrome's mobile device emulator with default values for Device Metrics and User-Agent.
Copy file name to clipboardExpand all lines: help_docs/recorder_mode.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,13 +11,13 @@
11
11
12
12
⏺️ Recorder Mode can be activated from the command-line interface or the Recorder Desktop App.
13
13
14
-
⏺️ To make a new recording from the command-line interface, use ``sbase mkrec``, ``sbase codegen``, or ``sbase record``:
14
+
⏺️ To make a new recording from the command-line interface, use `sbase mkrec`, `sbase codegen`, or `sbase record`:
15
15
16
16
```zsh
17
17
sbase mkrec TEST_NAME.py --url=URL
18
18
```
19
19
20
-
If the file already exists, you'll get an error. If no URL is provided, you'll start on a blank page and will need to navigate somewhere for the Recorder to activate. (The Recorder captures events on URLs that start with ``https``, ``http``, or ``file``.) The command above runs an empty test that stops at a breakpoint so that you can perform manual browser actions for the Recorder. When you have finished recording, type "``c``" on the command-line and press ``[ENTER]`` to continue from the breakpoint. The test will complete and a file called ``TEST_NAME_rec.py`` will be automatically created in the ``./recordings`` folder. That file will get copied back to the original folder with the name you gave it. (You can run with Edge instead of Chrome by adding ``--edge`` to the command above. For headed Linux machines, add ``--gui`` to prevent the default headless mode on Linux.)
20
+
If the file already exists, you'll get an error. If no URL is provided, you'll start on a blank page and will need to navigate somewhere for the Recorder to activate. (The Recorder captures events on URLs that start with `https`, `http`, or `file`.) The command above runs an empty test that stops at a breakpoint so that you can perform manual browser actions for the Recorder. When you have finished recording, type "`c`" on the command-line and press `[ENTER]` to continue from the breakpoint. The test will complete and a file called `TEST_NAME_rec.py` will be automatically created in the `./recordings` folder. That file will get copied back to the original folder with the name you gave it. (You can run with Edge instead of Chrome by adding `--edge` to the command above. For headed Linux machines, add `--gui` to prevent the default headless mode on Linux.)
⏺️ While a recording is in progress, you can press the ``[ESC]`` key to pause the Recorder. To resume the recording, you can hit the ``[~`]`` key, which is located directly below the ``[ESC]`` key on most keyboards.
60
+
⏺️ While a recording is in progress, you can press the `[ESC]` key to pause the Recorder. To resume the recording, you can hit the `[~`]` key, which is located directly below the `[ESC]` key on most keyboards.
61
61
62
-
⏺️ From within Recorder Mode there are two additional modes: "Assert Element Mode" and "Assert Text Mode". To switch into "Assert Element Mode", press the ``[^]-key (SHIFT+6 on standard QWERTY keyboards)``: The border will become purple, and you'll be able to click on elements to assert from your test. To switch into "Assert Text Mode", press the ``[&]-key (SHIFT+7 on standard QWERTY keyboards)``: The border will become teal, and you'll be able to click on elements for asserting text from your test.
62
+
⏺️ From within Recorder Mode there are two additional modes: "Assert Element Mode" and "Assert Text Mode". To switch into "Assert Element Mode", press the `[^]-key (SHIFT+6 on standard QWERTY keyboards)`: The border will become purple, and you'll be able to click on elements to assert from your test. To switch into "Assert Text Mode", press the `[&]-key (SHIFT+7 on standard QWERTY keyboards)`: The border will become teal, and you'll be able to click on elements for asserting text from your test.
63
63
64
-
⏺️ While using either of the two special Assertion Modes, certain actions such as clicking on links won't have any effect. This lets you make assertions on elements without navigating away from the page, etc. To add an assertion for buttons without triggering default "click" behavior, mouse-down on the button and then mouse-up somewhere else. (This prevents a detected click while still recording the assert.) To return back to the original Recorder Mode, press any key other than ``[SHIFT]`` or ``[BACKSPACE]`` (Eg: Press ``[CONTROL]``, etc.). Press ``[ESC]`` once to leave the Assertion Modes, but it'll stop the Recorder if you press it again.
64
+
⏺️ While using either of the two special Assertion Modes, certain actions such as clicking on links won't have any effect. This lets you make assertions on elements without navigating away from the page, etc. To add an assertion for buttons without triggering default "click" behavior, mouse-down on the button and then mouse-up somewhere else. (This prevents a detected click while still recording the assert.) To return back to the original Recorder Mode, press any key other than `[SHIFT]` or `[BACKSPACE]` (Eg: Press `[CONTROL]`, etc.). Press `[ESC]` once to leave the Assertion Modes, but it'll stop the Recorder if you press it again.
65
65
66
-
⏺️ For extra flexibility, the ``sbase mkrec``command can be split into four separate commands:
66
+
⏺️ For extra flexibility, the `sbase mkrec`command can be split into four separate commands:
The first command creates a boilerplate test with a breakpoint; the second command runs the test with the Recorder activated; the third command prints the completed test to the console; and the fourth command replaces the initial boilerplate with the completed test. If you're just experimenting with the Recorder, you can run the second command as many times as you want, and it'll override previous recordings saved to ``./recordings/TEST_NAME_rec.py``. (Note that ``-s`` is needed to allow breakpoints, unless you already have a ``pytest.ini`` file present where you set it. The ``-q`` is optional, which shortens ``pytest`` console output.)
78
+
The first command creates a boilerplate test with a breakpoint; the second command runs the test with the Recorder activated; the third command prints the completed test to the console; and the fourth command replaces the initial boilerplate with the completed test. If you're just experimenting with the Recorder, you can run the second command as many times as you want, and it'll override previous recordings saved to `./recordings/TEST_NAME_rec.py`. (Note that `-s` is needed to allow breakpoints, unless you already have a `pytest.ini` file present where you set it. The `-q` is optional, which shortens `pytest` console output.)
79
79
80
80
⏺️ You can also use the Recorder to add code to an existing test. To do that, you'll first need to create a breakpoint in your code to insert manual browser actions:
81
81
82
82
```python
83
83
breakpoint()
84
84
```
85
85
86
-
Now you'll be able to run your test with ``pytest``, and it will stop at the breakpoint foryou to addin actions: (Press ``c`` and ``ENTER`` on the command-line to continue from the breakpoint.)
86
+
Now you'll be able to run your test with `pytest`, and it will stop at the breakpoint foryou to addin actions: (Press `c` and `ENTER` on the command-line to continue from the breakpoint.)
87
87
88
88
```zsh
89
89
pytest TEST_NAME.py --rec -s
90
90
```
91
91
92
-
⏺️ You can also set a breakpoint at the start of your test by adding ``--trace`` as a ``pytest`` command-line option: (This is useful when running Recorder Mode without any ``pdb`` breakpoints.)
92
+
⏺️ You can also set a breakpoint at the start of your test by adding `--trace` as a `pytest` command-line option: (This is useful when running Recorder Mode without any `pdb` breakpoints.)
93
93
94
94
```zsh
95
95
pytest TEST_NAME.py --trace --rec -s
96
96
```
97
97
98
-
⏺️ 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.
98
+
⏺️ 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.
99
99
100
100
⏺️ Here's a command-line notification for a completed recording:
0 commit comments