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
## <imgsrc="https://cdn2.hubspot.net/hubfs/100006/images/super_square_logo_3a.png"title="SeleniumBase"height="32"> **How it works:**
3
5
4
-
At the core, SeleniumBase works by extending [Pytest](https://docs.pytest.org/en/latest/) and [Nosetests](http://nose.readthedocs.io/en/latest/) as a direct plugin to each one. SeleniumBase automatically spins up web browsers for tests, and then gives those tests access to the SeleniumBase libraries through the BaseCase class, [found here](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py). Now you can use "``--browser=chrome``" to specify the web browser to use (Default = "Chrome"). You can also include additional plugins for additional features such as "``--demo_mode``" (for highlighting elements & changing the speed of test runs) and "``--proxy=IP_ADDRESS:PORT``" (for using a proxy server during test runs). There are also other plugins available such as "``--with-db_reporting``", "``--with-s3_logging``", and more.
6
+
At the core, SeleniumBase works by extending [pytest](https://docs.pytest.org/en/latest/) and [nosetests](http://nose.readthedocs.io/en/latest/) as a direct plugin to each one. SeleniumBase automatically spins up web browsers for tests, and then gives those tests access to the SeleniumBase libraries through the [BaseCase class](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/fixtures/base_case.py). Tests are also given access to SeleniumBase [command-line arguments](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/plugins/pytest_plugin.py), which provide additional functionality.
5
7
6
-
(NOTE: Pytest and Nosetests work by automatically running any Python method that starts with "``test``" from the file that you specified on the command line. You can also run all tests from a specific class in a file, or even pick out an individual test to run.)
8
+
(NOTE: pytest and nosetests use a feature called test discovery to automatically find and run Python methods that start with "``test_``" from the file that you specified on the command line.)
To run web automation, you'll need to download a web driver for each browser you plan on using and place those on your System **[PATH](http://java.com/en/download/help/path.xml)**. Additionaly, you can place drivers in the [SeleniumBase `drivers` folder](https://github.com/seleniumbase/SeleniumBase/blob/master/drivers). If you plan on taking the latter option, here are some commands that'll automatically download the driver you need into the ``drivers`` folder once you've installed SeleniumBase:
5
+
To run web automation, you'll need to download webdrivers for each browser you plan on using, and then place those on your System **[PATH](http://java.com/en/download/help/path.xml)**. Additionaly, you can place drivers in the [SeleniumBase `drivers` folder](https://github.com/seleniumbase/SeleniumBase/blob/master/drivers). If you plan on taking the latter option, here are some commands that'll automatically download the driver you need into the ``drivers`` folder once you've installed SeleniumBase:
* If you have the latest version of Chrome installed, get the latest chromedriver (<i>otherwise it defaults to chromedriver 2.44 for compatibility reasons</i>):
15
+
```bash
16
+
seleniumbase install chromedriver latest
17
+
```
13
18
14
19
If you plan on using the [Selenium Grid integration](https://github.com/seleniumbase/SeleniumBase/blob/master/seleniumbase/utilities/selenium_grid/ReadMe.md) (which allows for remote webdriver), you'll need to put the drivers on your System PATH. On macOS and Linux, ``/usr/local/bin`` is a good PATH spot. On Windows, you may need to set the System PATH under Environment Variables to include the location where you placed the driver files. As a shortcut, you could place the driver files into your Python ``Scripts/`` folder in the location where you have Python installed, which should already be on your System PATH.
15
20
@@ -37,7 +42,7 @@ brew cask install chromedriver
37
42
brew install geckodriver
38
43
```
39
44
40
-
(NOTE: If your existing version of chromedriver is less than 2.40, **upgrading is required** in order to keep up with the latest version of Chrome!)
45
+
(NOTE: If your existing version of chromedriver is less than 2.44, **upgrading is required** in order to keep up with the latest version of Chrome!)
41
46
42
47
```bash
43
48
brew cask upgrade chromedriver
@@ -50,15 +55,15 @@ brew upgrade geckodriver
50
55
If you still need the web drivers, here are some scripts to help you install chromedriver and geckodriver on a Linux machine:
0 commit comments