Skip to content

Commit 499137d

Browse files
committed
Update the documentation
1 parent 4ea8680 commit 499137d

File tree

5 files changed

+50
-64
lines changed

5 files changed

+50
-64
lines changed

help_docs/webdriver_installation.md

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

3-
## [<img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Installing webdrivers
3+
## [<img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32">](https://github.com/seleniumbase/SeleniumBase/) Installing webdrivers
44

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

77
You can also download drivers manually with these commands:
88

99
```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
1313
```
1414

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

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

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

2321
```bash
24-
sbase get chromedriver 107.0.5304.62
25-
2622
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
2727
```
2828

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``)
3030

31-
```bash
32-
wget https://raw.githubusercontent.com/seleniumbase/SeleniumBase/master/examples/upgrade_chromedriver.py
33-
pytest upgrade_chromedriver.py -s
34-
```
31+
--------
3532

36-
* 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.
3934

4035
Here's where you can go to manually get web drivers from the source:
4136

4237
* For Chrome, get [Chromedriver](https://sites.google.com/a/chromium.org/chromedriver/downloads) on your System PATH.
4338

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

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

4843
* For Safari, get [Safari Driver](https://github.com/seleniumbase/SeleniumBase/blob/master/help_docs/using_safari_driver.md) on your System PATH.
4944

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-
5445
**macOS shortcuts**:
5546

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``):
5748

5849
```bash
5950
brew install --cask chromedriver
@@ -71,7 +62,7 @@ brew upgrade geckodriver
7162

7263
**Linux shortcuts**:
7364

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

7667
```bash
7768
wget https://chromedriver.storage.googleapis.com/72.0.3626.69/chromedriver_linux64.zip
@@ -87,6 +78,6 @@ mv geckodriver /usr/local/bin/
8778
chmod +x /usr/local/bin/geckodriver
8879
```
8980

90-
* 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)**.
9182

92-
[<img src="https://seleniumbase.io/cdn/img/sb_logo_b.png" title="SeleniumBase" width="280">](https://github.com/seleniumbase/SeleniumBase)
83+
[<img src="https://seleniumbase.github.io/cdn/img/sb_logo_b.png" title="SeleniumBase" width="280">](https://github.com/seleniumbase/SeleniumBase)

seleniumbase/behave/behave_sb.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
behave -D agent="User Agent String" -D demo
99
****************************************************************
1010
-D browser=BROWSER (The web browser to use. Default: "chrome".)
11-
-D chrome (Shortcut for "-D browser=chrome". On by default.)
11+
-D chrome (Shortcut for "-D browser=chrome". Default.)
1212
-D edge (Shortcut for "-D browser=edge".)
1313
-D firefox (Shortcut for "-D browser=firefox".)
1414
-D safari (Shortcut for "-D browser=safari".)

seleniumbase/drivers/ReadMe.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,27 @@
1-
### <img src="https://seleniumbase.io/img/logo6.png" title="SeleniumBase" width="32" /> SeleniumBase webdriver storage
1+
### <img src="https://seleniumbase.github.io/img/logo6.png" title="SeleniumBase" width="32" /> SeleniumBase webdriver storage
22

3-
* 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:
46

57
```bash
68
seleniumbase get chromedriver
79
seleniumbase get geckodriver
810
seleniumbase get edgedriver
9-
seleniumbase get iedriver
10-
seleniumbase get operadriver
1111
```
1212

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

2115
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.
2216

2317
* You can also download specific versions of drivers. Examples:
2418

2519
```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
2823
sbase get chromedriver latest-1
29-
sbase get edgedriver 101.0.1210.32
24+
sbase get edgedriver 106.0.1370.42
3025
```
26+
27+
(NOTE: ``sbase`` is a shortcut for ``seleniumbase``)

seleniumbase/plugins/pytest_plugin.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def pytest_addoption(parser):
2727
"""
2828
This plugin adds the following command-line options to pytest:
2929
--browser=BROWSER (The web browser to use. Default: "chrome".)
30-
--chrome (Shortcut for "--browser=chrome". On by default.)
30+
--chrome (Shortcut for "--browser=chrome". Default.)
3131
--edge (Shortcut for "--browser=edge".)
3232
--firefox (Shortcut for "--browser=firefox".)
3333
--safari (Shortcut for "--browser=safari".)
@@ -137,50 +137,49 @@ def pytest_addoption(parser):
137137
choices=constants.ValidBrowsers.valid_browsers,
138138
default=constants.Browser.GOOGLE_CHROME,
139139
help="""Specifies the web browser to use. Default: Chrome.
140-
If you want to use Firefox, explicitly indicate that.
141-
Example: (--browser=firefox)""",
140+
Examples: (--browser=edge OR --browser=firefox)""",
142141
)
143142
parser.addoption(
144143
"--chrome",
145144
action="store_true",
146145
dest="use_chrome",
147146
default=False,
148-
help="""Shortcut for --browser=chrome. On by default.)""",
147+
help="""Shortcut for --browser=chrome (Default)""",
149148
)
150149
parser.addoption(
151150
"--edge",
152151
action="store_true",
153152
dest="use_edge",
154153
default=False,
155-
help="""Shortcut for --browser=edge.)""",
154+
help="""Shortcut for --browser=edge""",
156155
)
157156
parser.addoption(
158157
"--firefox",
159158
action="store_true",
160159
dest="use_firefox",
161160
default=False,
162-
help="""Shortcut for --browser=firefox.)""",
161+
help="""Shortcut for --browser=firefox""",
163162
)
164163
parser.addoption(
165164
"--ie",
166165
action="store_true",
167166
dest="use_ie",
168167
default=False,
169-
help="""Shortcut for --browser=ie.)""",
168+
help="""Shortcut for --browser=ie""",
170169
)
171170
parser.addoption(
172171
"--opera",
173172
action="store_true",
174173
dest="use_opera",
175174
default=False,
176-
help="""Shortcut for --browser=opera.)""",
175+
help="""Shortcut for --browser=opera""",
177176
)
178177
parser.addoption(
179178
"--safari",
180179
action="store_true",
181180
dest="use_safari",
182181
default=False,
183-
help="""Shortcut for --browser=safari.)""",
182+
help="""Shortcut for --browser=safari""",
184183
)
185184
parser.addoption(
186185
"--with-selenium",
@@ -921,7 +920,7 @@ def pytest_addoption(parser):
921920
action="store_true",
922921
dest="uc_subprocess",
923922
default=None,
924-
help="""(DEPRECATED) - Setting will always be enabled.
923+
help="""(DEPRECATED) - (UC Mode always uses this now.)
925924
Use undetectable-chromedriver as a subprocess,
926925
which can help avoid issues that might result.
927926
It may reduce UC's ability to avoid detection.""",

seleniumbase/plugins/selenium_plugin.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class SeleniumBrowser(Plugin):
1919
"""
2020
This plugin adds the following command-line options to nosetests:
2121
--browser=BROWSER (The web browser to use. Default: "chrome".)
22-
--chrome (Shortcut for "--browser=chrome". On by default.)
22+
--chrome (Shortcut for "--browser=chrome". Default.)
2323
--edge (Shortcut for "--browser=edge".)
2424
--firefox (Shortcut for "--browser=firefox".)
2525
--safari (Shortcut for "--browser=safari".)
@@ -103,50 +103,49 @@ def options(self, parser, env):
103103
choices=constants.ValidBrowsers.valid_browsers,
104104
default=constants.Browser.GOOGLE_CHROME,
105105
help="""Specifies the web browser to use. Default: Chrome.
106-
If you want to use Firefox, explicitly indicate that.
107-
Example: (--browser=firefox)""",
106+
Examples: (--browser=edge OR --browser=firefox)""",
108107
)
109108
parser.add_option(
110109
"--chrome",
111110
action="store_true",
112111
dest="use_chrome",
113112
default=False,
114-
help="""Shortcut for --browser=chrome. On by default.)""",
113+
help="""Shortcut for --browser=chrome (Default)""",
115114
)
116115
parser.add_option(
117116
"--edge",
118117
action="store_true",
119118
dest="use_edge",
120119
default=False,
121-
help="""Shortcut for --browser=edge.)""",
120+
help="""Shortcut for --browser=edge""",
122121
)
123122
parser.add_option(
124123
"--firefox",
125124
action="store_true",
126125
dest="use_firefox",
127126
default=False,
128-
help="""Shortcut for --browser=firefox.)""",
127+
help="""Shortcut for --browser=firefox""",
129128
)
130129
parser.add_option(
131130
"--ie",
132131
action="store_true",
133132
dest="use_ie",
134133
default=False,
135-
help="""Shortcut for --browser=ie.)""",
134+
help="""Shortcut for --browser=ie""",
136135
)
137136
parser.add_option(
138137
"--opera",
139138
action="store_true",
140139
dest="use_opera",
141140
default=False,
142-
help="""Shortcut for --browser=opera.)""",
141+
help="""Shortcut for --browser=opera""",
143142
)
144143
parser.add_option(
145144
"--safari",
146145
action="store_true",
147146
dest="use_safari",
148147
default=False,
149-
help="""Shortcut for --browser=safari.)""",
148+
help="""Shortcut for --browser=safari""",
150149
)
151150
parser.add_option(
152151
"--cap_file",
@@ -681,7 +680,7 @@ def options(self, parser, env):
681680
action="store_true",
682681
dest="uc_subprocess",
683682
default=None,
684-
help="""(DEPRECATED) - Setting will always be enabled.
683+
help="""(DEPRECATED) - (UC Mode always uses this now.)
685684
Use undetectable-chromedriver as a subprocess,
686685
which can help avoid issues that might result.
687686
It may reduce UC's ability to avoid detection.""",

0 commit comments

Comments
 (0)