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
### [**Get Started**](#seleniumbase_installation), or Learn More:
14
14
15
15
**No more repetitive WebDriver code:**<br />
16
-
SeleniumBase automatically handles common WebDriver actions such as spinning up web browsers, waiting for page objects to load, saving screenshots during test failures, and more. (<i>[Read about the command line interface](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/command_line.md).</i>)
16
+
SeleniumBase automatically handles common WebDriver actions such as spinning up web browsers, waiting for page objects to load, saving screenshots during test failures, using a proxy server, and more. (<i>[Read about customizing test runs](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md).</i>)
17
17
18
18
**Simple Python syntax makes coding easy:**<br />
19
19
@@ -90,22 +90,22 @@ cd SeleniumBase
90
90
91
91
If you're installing SeleniumBase from a cloned copy on your machine, use:
92
92
```
93
-
pip install -U -r requirements.txt
93
+
pip install -r requirements.txt
94
94
95
95
python setup.py develop
96
96
```
97
97
98
98
If you're installing SeleniumBase from the [Python Package Index](https://pypi.python.org/pypi/seleniumbase), use:
99
99
```bash
100
-
pip install -U seleniumbase
100
+
pip install seleniumbase
101
101
```
102
102
103
103
If you're installing SeleniumBase directly from GitHub, use:
(If you encounter permission errors during installation while not using a virtual environment, you may need to add ``--user`` to your ``pip`` command.)
108
+
(If you encounter permission errors during installation while not using a virtual environment, you may need to add ``--user`` to your pip command. If you already have an older version of SeleniumBase installed, you may want to add ``--upgrade`` or ``-U`` to your pip command.)
Copy file name to clipboardExpand all lines: examples/ReadMe.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
## Running SeleniumBase Scripts
2
2
3
-
(NOTE: If you didn't install SeleniumBase properly, these scripts won't work. Installation steps include "``pip install seleniumbase``" and/or "``python setup.py develop``" from the top-level directory.)
3
+
(NOTE: If you didn't install SeleniumBase properly, these scripts won't work. Installation steps include ``pip install seleniumbase`` OR ``pip install -r requirements.txt`` + ``python setup.py develop``" from the top-level directory.)
4
4
5
5
To makes things easier, here's a simple GUI program that allows you to kick off a few example scripts by pressing a button:
6
6
@@ -10,7 +10,7 @@ python gui_test_runner.py
10
10
11
11
(NOTE: With the exception of [my_first_test.py](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py), which should pass, many other tests in this folder fail on purpose to demonstrate features such as screenshots on failure, exception logging, and test reports.)
12
12
13
-
(NOTE: You can interchange ``nosetests`` with ``pytest`` in most of these examples.)
13
+
(NOTE: You can interchange ``pytest`` with ``nosetests`` in most of these examples.)
14
14
15
15
<imgsrc="https://cdn2.hubspot.net/hubfs/100006/images/The_GUI_Runner.png"title="GUI Test Runner"height="400">
Run a failing test (and then look into the ``latest_logs`` folder afterwards:
62
62
```bash
63
63
pytest test_fail.py --browser=chrome
64
64
```
65
65
66
+
For more advanced run commands, such as using a proxy server, see [../help_docs/customizing_test_runs.md](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/customizing_test_runs.md)
67
+
66
68
(NOTE: If you see any ``*.pyc`` files appear as you run tests, that's perfectly normal. Compiled bytecode is a natural result of running Python code.)
Copy file name to clipboardExpand all lines: help_docs/customizing_test_runs.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
### The Command Line Interface
1
+
### Customizing test runs from the command line
2
2
3
3
In addition to [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py), which allows you to customize the test framework, SeleniumBase gives you the flexibility to customize & control test runs from the command line:
If any test is moving too fast for your eyes to see what's going on, you can run it in **Demo Mode** by adding ``--demo_mode`` on the command line, which pauses the browser briefly between actions, and highlights page elements being acted on:
You can override the default wait time by either updating [settings.py](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/config/settings.py) or by using ``--demo_sleep={NUM}`` when using Demo Mode. (NOTE: If you use ``--demo_sleep={NUM}`` without using ``--demo_mode``, nothing will happen.)
56
56
57
57
If you ever make any changes to your local copy of ``settings.py``, you may need to run ``python setup.py install`` for those changes to take effect.
The above code (with --pdb) will leave your browser window open in case there's a failure, which is possible if the web pages from the example change the data that's displayed on the page. (ipdb commands: 'c', 's', 'n' => continue, step, next). You may need the ``-s`` in order to see all console output.
#### Step 12. Install SeleniumBase (Make sure you already installed the requirements above)
77
77
78
78
```bash
79
-
sudo python server_setup.py develop
79
+
sudo python setup.py develop
80
80
```
81
81
82
82
#### Step 13. Run an [example test](https://github.com/seleniumbase/SeleniumBase/blob/master/examples/my_first_test.py) in Chrome to verify installation (Takes ~10 seconds)
## This page has been moved to: [../selenium_ide/ReadMe.md](https://github.com/seleniumbase/SeleniumBase/blob/master/integrations/selenium_ide/ReadMe.md)
Copy file name to clipboardExpand all lines: integrations/selenium_ide/ReadMe.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,14 @@
1
-
## Converting Selenium IDE recordings into SeleniumBase test scripts
1
+
## Converting Katalon-based Selenium IDE recordings into SeleniumBase test scripts
2
2
3
-
[Selenium IDE](http://docs.seleniumhq.org/projects/ide/) is a tool that allows you to record and playback actions performed inside a web browser. It's available as a [downloadable Firefox extension](https://addons.mozilla.org/en-US/firefox/addon/selenium-ide/). Selenium IDE comes with an option to export recordings as various WebDriver test scripts, one of which is ``Python2/unittest/WebDriver``. Unfortunately, these natively-exported scripts tend to be very messy and don't run reliably. The purpose of this converter is to clean up and improve the scripts so that they can be used in production-level environments.
3
+
[Katelon Recorder / Selenium IDE](https://www.katalon.com/resources-center/blog/katalon-automation-recorder/) (<i>the successor to the [old Selenium IDE](http://docs.seleniumhq.org/projects/ide/)</i>) is a tool that allows you to record and playback actions performed inside a web browser. It's available as a [downloadable Chrome extension](https://chrome.google.com/webstore/detail/katalon-recorder-selenium/ljdobmomdgdljniojadhoplhkpialdid) and a [downloadable Firefox extension](https://addons.mozilla.org/en-US/firefox/addon/katalon-automation-record/). Katelon Recorder comes with an option to export recordings as various WebDriver test scripts, one of which is ``Python 2 (WebDriver + unittest)``. Unfortunately, these natively-exported scripts can be very messy and don't always run reliably. The purpose of this converter is to clean up and improve the scripts so that they can be used in production-level environments.
4
4
5
-
#### Step 1: Make a recording with Selenium IDE
5
+
#### Step 1: Make a recording with Katelon Recorder
6
6
7
-

0 commit comments