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
To run web automation, you'll need webdrivers for each browser you plan on using. With SeleniumBase, drivers are downloaded automatically as needed into the SeleniumBase ``drivers`` folder.
6
6
7
7
You can also download drivers manually with these commands:
8
8
9
9
```bash
10
-
sbase get chromedriver
11
-
sbase get geckodriver
12
-
sbase get edgedriver
10
+
seleniumbase get chromedriver
11
+
seleniumbase get geckodriver
12
+
seleniumbase get edgedriver
13
13
```
14
14
15
-
* To get the latest ``chromedriver``when you don't have the latest Chrome, use:
15
+
After running the commands above, web drivers will get downloaded into the ``seleniumbase/drivers/``folder. SeleniumBase uses those drivers during tests. (The drivers don't come with SeleniumBase by default.)
16
16
17
-
```bash
18
-
sbase get chromedriver latest
19
-
```
17
+
If the necessary driver is not found in this location while running tests, SeleniumBase will instead look for the driver on the System PATH. If the necessary driver is not on the System PATH either, SeleniumBase will automatically attempt to download the required driver.
20
18
21
-
* You can also get a specific version of chromedriver for a specific version of Chrome:
19
+
* You can also download specific versions of drivers. Examples:
22
20
23
21
```bash
24
-
sbase get chromedriver 107.0.5304.62
25
-
26
22
sbase get chromedriver 107
23
+
sbase get chromedriver 107.0.5304.62
24
+
sbase get chromedriver latest
25
+
sbase get chromedriver latest-1
26
+
sbase get edgedriver 106.0.1370.42
27
27
```
28
28
29
-
* On Linux, you can run the following two commands (once you've installed SeleniumBase) to automatically upgrade your Chromedriver to match your version of Chrome: (``wget``downloads the file, and``pytest`` runs it.)
29
+
(NOTE: ``sbase``is a shortcut for``seleniumbase``)
* If you run a test without the correct webdriver available, the driver will be downloaded automatically.
37
-
38
-
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.
33
+
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.
39
34
40
35
Here's where you can go to manually get web drivers from the source:
41
36
42
37
* For Chrome, get [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) on your System PATH.
43
38
44
-
* For Firefox, get [Geckodriver](https://github.com/mozilla/geckodriver/releases) on your System PATH.
39
+
* For Edge, get [Edge Driver (Microsoft WebDriver)](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/) on your System PATH.
45
40
46
-
* For Microsoft Edge, get [Edge Driver (Microsoft WebDriver)](https://developer.microsoft.com/en-us/microsoft-edge/tools/webdriver/) on your System PATH.
41
+
* For Firefox, get [Geckodriver](https://github.com/mozilla/geckodriver/releases) on your System PATH.
47
42
48
43
* For Safari, get [Safari Driver](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/using_safari_driver.md) on your System PATH.
49
44
50
-
* For Opera, get [Opera Chromium Driver](https://github.com/operasoftware/operachromiumdriver/releases) on your System PATH..
51
-
52
-
* For PhantomJS headless browser automation, get [PhantomJS](http://phantomjs.org/download.html) on your System PATH. (NOTE: <i>PhantomJS is no longer officially supported by SeleniumHQ</i>)
53
-
54
45
**macOS shortcuts**:
55
46
56
-
* You can also install drivers by using ``brew`` (aka ``homebrew``), but you'll need to install that first. [Brew installation instructions are here](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/install_python_pip_git.md).
47
+
* You can also install drivers by using ``brew`` (aka ``homebrew``):
57
48
58
49
```bash
59
50
brew install --cask chromedriver
@@ -71,7 +62,7 @@ brew upgrade geckodriver
71
62
72
63
**Linux shortcuts**:
73
64
74
-
If you still need the web drivers, here are some scripts to help you get chromedriver and geckodriver on a Linux machine:
65
+
If you still need the web drivers, here are some scripts to help you get ``chromedriver`` and ``geckodriver`` on a Linux machine:
* If you wish to verify that web drivers are working, **[follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/verify_webdriver.md)**.
81
+
To verify that web drivers are working, **[follow these instructions](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/verify_webdriver.md)**.
* You need a different webdriver for each web browser you want to run automation on: ``chromedriver`` for Chrome, ``edgedriver`` for Edge, ``geckodriver`` for Firefox, ``operadriver`` for Opera, and ``iedriver`` for Internet Explorer.
3
+
To run web automation, you'll need webdrivers for each browser you plan on using. With SeleniumBase, drivers are downloaded automatically as needed into the SeleniumBase ``drivers`` folder.
4
+
5
+
You can also download drivers manually with these commands:
4
6
5
7
```bash
6
8
seleniumbase get chromedriver
7
9
seleniumbase get geckodriver
8
10
seleniumbase get edgedriver
9
-
seleniumbase get iedriver
10
-
seleniumbase get operadriver
11
11
```
12
12
13
-
After running the commands above, web drivers will get downloaded into this folder. SeleniumBase will then use those drivers during tests if present. (The drivers don't come with SeleniumBase by default.)
14
-
15
-
* If you have the latest version of Chrome installed, get the latest chromedriver (<i>otherwise it defaults to chromedriver 72.0.3626.69 for compatibility reasons</i>):
16
-
17
-
```bash
18
-
sbase get chromedriver latest
19
-
```
13
+
After running the commands above, web drivers will get downloaded into the ``seleniumbase/drivers/`` folder. SeleniumBase uses those drivers during tests. (The drivers don't come with SeleniumBase by default.)
20
14
21
15
If the necessary driver is not found in this location while running tests, SeleniumBase will instead look for the driver on the System PATH. If the necessary driver is not on the System PATH either, SeleniumBase will automatically attempt to download the required driver.
22
16
23
17
* You can also download specific versions of drivers. Examples:
24
18
25
19
```bash
26
-
sbase get chromedriver 101
27
-
sbase get chromedriver 101.0.4951.41
20
+
sbase get chromedriver 107
21
+
sbase get chromedriver 107.0.5304.62
22
+
sbase get chromedriver latest
28
23
sbase get chromedriver latest-1
29
-
sbase get edgedriver 101.0.1210.32
24
+
sbase get edgedriver 106.0.1370.42
30
25
```
26
+
27
+
(NOTE: ``sbase`` is a shortcut for ``seleniumbase``)
0 commit comments