Skip to content

Commit e037dbc

Browse files
committed
Add additional ways to set the user agent
1 parent f2f252a commit e037dbc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

seleniumbase/plugins/pytest_plugin.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ def pytest_addoption(parser):
216216
username:password@servername:port OR
217217
A dict key from proxy_list.PROXY_LIST
218218
Default: None.""")
219-
parser.addoption('--agent', action='store',
219+
parser.addoption('--agent', '--user-agent', '--user_agent',
220+
action='store',
220221
dest='user_agent',
221222
default=None,
222223
help="""Designates the User-Agent for the browser to use.

seleniumbase/plugins/selenium_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def options(self, parser, env):
119119
A dict key from proxy_list.PROXY_LIST
120120
Default: None.""")
121121
parser.add_option(
122-
'--agent',
122+
'--agent', '--user-agent', '--user_agent',
123123
action='store',
124124
dest='user_agent',
125125
default=None,

0 commit comments

Comments
 (0)