Skip to content

Commit 50692bf

Browse files
committed
Refactor a few ReadMe files
1 parent d3e87ce commit 50692bf

4 files changed

Lines changed: 26 additions & 26 deletions

File tree

help_docs/install_python_pip_git.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- SeleniumBase Docs -->
22

3-
## Installation instructions for ``Git``, ``Python``, and ``pip``
3+
## Installation instructions for `Git`, `Python`, and `pip`
44

55
### [Git](http://www.git-scm.com)
66

@@ -16,9 +16,9 @@ You can download Python from [https://www.python.org/downloads/](https://www.pyt
1616

1717
### [pip](https://en.wikipedia.org/wiki/Pip_%28package_manager%29)
1818

19-
**``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`.)
2020

21-
⚠️ If something went wrong with your ``pip`` installation, try this:
21+
⚠️ If something went wrong with your `pip` installation, try this:
2222

2323
```zsh
2424
python -m ensurepip --default-pip
@@ -30,7 +30,7 @@ If your existing version of pip is old, upgrade to the latest version:
3030
python -m pip install --upgrade pip setuptools
3131
```
3232

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`:
3434

3535
```zsh
3636
yum -y update
@@ -39,7 +39,7 @@ yum -y install python-pip
3939

4040
If you're having any trouble getting pip, you can [GET PIP HERE](https://pip.pypa.io/en/latest/installation/).
4141

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.)
4343

4444
You can also get pip (or fix pip) by using:
4545

@@ -55,4 +55,4 @@ curl https://bootstrap.pypa.io/get-pip.py | python
5555
python -m pip install -U pip setuptools
5656
```
5757

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.)
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.)

help_docs/mobile_testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<h2><a href="https://github.com/seleniumbase/SeleniumBase/"><img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32"></a> Mobile Mode / Mobile Testing</h2>
44

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.
66

77
<b>Here's an example mobile test:</b>
88

help_docs/recorder_mode.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
⏺️ Recorder Mode can be activated from the command-line interface or the Recorder Desktop App.
1313

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`:
1515

1616
```zsh
1717
sbase mkrec TEST_NAME.py --url=URL
1818
```
1919

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.)
2121

2222
Example:
2323

@@ -57,13 +57,13 @@ sbase recorder
5757
5858
<img src="https://seleniumbase.github.io/cdn/img/recorder_desktop_2.png" title="SeleniumBase" width="340">
5959
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.
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.
6161

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.
6363

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.
6565

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

6868
```zsh
6969
sbase mkfile TEST_NAME.py --rec
@@ -75,27 +75,27 @@ sbase print ./recordings/TEST_NAME_rec.py -n
7575
cp ./recordings/TEST_NAME_rec.py ./TEST_NAME.py
7676
```
7777

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.)
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.)
7979

8080
⏺️ 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:
8181
8282
```python
8383
breakpoint()
8484
```
8585
86-
Now you'll be able to run your test with ``pytest``, and it will stop at the breakpoint for you to add in 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 for you to add in actions: (Press `c` and `ENTER` on the command-line to continue from the breakpoint.)
8787

8888
```zsh
8989
pytest TEST_NAME.py --rec -s
9090
```
9191

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.)
9393

9494
```zsh
9595
pytest TEST_NAME.py --trace --rec -s
9696
```
9797

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.
9999

100100
⏺️ Here's a command-line notification for a completed recording:
101101

help_docs/useful_grep_commands.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@
44

55
There are several useful **grep** commands for helping you find and/or replace text in multiple files. Examples:
66

7-
#### List all files containing ``self.get_new_driver(``, ignoring ".pyc" files, from the current directory:
7+
#### List all files containing `self.get_new_driver(`, ignoring ".pyc" files, from the current directory:
88

9-
``grep -rl "self.get_new_driver(" * --exclude=\*.pyc``
9+
`grep -rl "self.get_new_driver(" * --exclude=\*.pyc`
1010
OR
11-
``grep -rl * -e "self.get_new_driver(" --exclude=\*.pyc``
11+
`grep -rl * -e "self.get_new_driver(" --exclude=\*.pyc`
1212

13-
To only search ``.py`` files, use ``--include=\*.py``:
13+
To only search `.py` files, use `--include=\*.py`:
1414

15-
``grep -rl "self.get_new_driver(" * --include=\*.py``
15+
`grep -rl "self.get_new_driver(" * --include=\*.py`
1616

1717
--------
1818

1919
#### Replace all occurrences of "foo_abc" with "bar_xyz" on Linux, for Python files from the current directory:
2020

21-
``sed -i 's/foo_abc/bar_xyz/g' *.py``
21+
`sed -i 's/foo_abc/bar_xyz/g' *.py`
2222

2323
#### Replace all occurrences of "foo_abc" with "bar_xyz" on macOS, for Python files from the current directory:
2424

25-
``sed -i '' 's/foo_abc/bar_xyz/g' *.py``
25+
`sed -i '' 's/foo_abc/bar_xyz/g' *.py`
2626

2727
--------
2828

29-
#### Find all chromedriver processes (this combines ``ps`` with ``grep``):
29+
#### Find all chromedriver processes (this combines `ps` with `grep`):
3030

31-
``ps -ef |grep chromedriver``
31+
`ps -ef |grep chromedriver`
3232

3333
--------
3434

0 commit comments

Comments
 (0)