Skip to content

Commit 529a0a3

Browse files
committed
Update command-line descriptions
1 parent 734444e commit 529a0a3

File tree

3 files changed

+62
-39
lines changed

3 files changed

+62
-39
lines changed

seleniumbase/plugins/base_plugin.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
1-
"""
2-
This is the Nose plugin for saving logs and setting a test environment.
3-
Vars include "env" and "log_path".
4-
You can have tests behave differently based on the environment.
5-
You can access the values of these variables from the tests.
6-
"""
1+
# -*- coding: utf-8 -*-
2+
""" This is the Nose plugin for saving logs and setting a test environment. """
73

84
import os
95
import sys
@@ -17,8 +13,8 @@
1713

1814
class Base(Plugin):
1915
"""
20-
The base_plugin includes the following command-line options for nosetests:
21-
--env=ENV (Set a test environment. Use "self.env" to access env in tests.)
16+
This parser plugin includes the following command-line options for Nose:
17+
--env=ENV (Set a test environment. Use "self.env" to use this in tests.)
2218
--data=DATA (Extra data to pass to tests. Use "self.data" in tests.)
2319
--log_path=LOG_PATH (The directory where log files get saved to.)
2420
--archive_logs (Archive old log files instead of deleting them.)

seleniumbase/plugins/pytest_plugin.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,37 @@
1111

1212

1313
def pytest_addoption(parser):
14+
"""
15+
This parser plugin includes the following command-line options for pytest:
16+
--browser=BROWSER (The web browser to use.)
17+
--cap_file=FILE (The web browser's desired capabilities to use.)
18+
--env=ENV (Set a test environment. Use "self.env" to use this in tests.)
19+
--data=DATA (Extra data to pass to tests. Use "self.data" in tests.)
20+
--user_data_dir=DIR (Set the Chrome user data directory to use.)
21+
--server=SERVER (The server / IP address used by the tests.)
22+
--port=PORT (The port that's used by the test server.)
23+
--proxy=SERVER:PORT (This is the proxy server:port combo used by tests.)
24+
--agent=STRING (This designates the web browser's User Agent to use.)
25+
--extension_zip=ZIP (Load a Chrome Extension .zip file, comma-separated.)
26+
--extension_dir=DIR (Load a Chrome Extension directory, comma-separated.)
27+
--headless (The option to run tests headlessly. The default on Linux OS.)
28+
--headed (The option to run tests with a GUI on Linux OS.)
29+
--start_page=URL (The starting URL for the web browser when tests begin.)
30+
--log_path=LOG_PATH (The directory where log files get saved to.)
31+
--archive_logs (Archive old log files instead of deleting them.)
32+
--demo_mode (The option to visually see test actions as they occur.)
33+
--demo_sleep=SECONDS (The option to wait longer after Demo Mode actions.)
34+
--highlights=NUM (Number of highlight animations for Demo Mode actions.)
35+
--message_duration=SECONDS (The time length for Messenger alerts.)
36+
--check_js (The option to check for JavaScript errors after page loads.)
37+
--ad_block (The option to block some display ads after page loads.)
38+
--verify_delay=SECONDS (The delay before MasterQA verification checks.)
39+
--disable_csp (This disables the Content Security Policy of websites.)
40+
--enable_sync (The option to enable "Chrome Sync".)
41+
--save_screenshot (The option to save a screenshot after each test.)
42+
--visual_baseline (Set the visual baseline for Visual/Layout tests.)
43+
--timeout_multiplier=MULTIPLIER (Multiplies the default timeout values.)
44+
"""
1445
parser = parser.getgroup('SeleniumBase',
1546
'SeleniumBase specific configuration options')
1647
parser.addoption('--browser',

seleniumbase/plugins/selenium_plugin.py

Lines changed: 27 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
1-
"""
2-
This plugin gives the power of Selenium to nosetests
3-
by providing a WebDriver object for the tests to use.
4-
"""
1+
# -*- coding: utf-8 -*-
2+
""" This is the nosetests Selenium plugin for test configuration. """
53

64
import sys
75
from nose.plugins import Plugin
@@ -11,33 +9,31 @@
119

1210
class SeleniumBrowser(Plugin):
1311
"""
14-
The plugin for Selenium tests. Takes in key arguments and then
15-
creates a WebDriver object. All arguments are passed to the tests.
16-
17-
The following command line options are available to the tests:
18-
self.options.browser -- the browser to use (--browser)
19-
self.options.cap_file -- browser's desired capabilities file (--cap_file)
20-
self.options.user_data_dir -- set Chrome's user data dir (--user_data_dir)
21-
self.options.server -- the server used by the test (--server)
22-
self.options.port -- the port used by the test (--port)
23-
self.options.proxy -- designates the proxy server:port to use. (--proxy)
24-
self.options.agent -- designates the User Agent for the browser. (--agent)
25-
self.options.extension_zip -- load a Chrome Extension ZIP (--extension_zip)
26-
self.options.extension_dir -- load a Chrome Extension DIR (--extension_dir)
27-
self.options.headless -- the option to run headlessly (--headless)
28-
self.options.headed -- the option to run with a GUI on Linux (--headed)
29-
self.options.demo_mode -- the option to slow down Selenium (--demo_mode)
30-
self.options.demo_sleep -- Selenium action delay in DemoMode (--demo_sleep)
31-
self.options.highlights -- # of highlight animations shown (--highlights)
32-
self.options.message_duration -- Messenger alert time (--message_duration)
33-
self.options.js_checking_on -- option to check for js errors (--check_js)
34-
self.options.ad_block -- the option to block some display ads (--ad_block)
35-
self.options.verify_delay -- delay before MasterQA checks (--verify_delay)
36-
self.options.disable_csp -- disable Content Security Policy (--disable_csp)
37-
self.options.enable_sync -- option to enable "Chrome Sync" (--enable_sync)
38-
self.options.save_screenshot -- save screen after test (--save_screenshot)
39-
self.options.visual_baseline -- set the visual baseline (--visual_baseline)
40-
self.options.timeout_multiplier -- increase defaults (--timeout_multiplier)
12+
This parser plugin includes the following command-line options for Nose:
13+
--browser=BROWSER (The web browser to use.)
14+
--cap_file=FILE (The web browser's desired capabilities to use.)
15+
--user_data_dir=DIR (Set the Chrome user data directory to use.)
16+
--server=SERVER (The server / IP address used by the tests.)
17+
--port=PORT (The port that's used by the test server.)
18+
--proxy=SERVER:PORT (This is the proxy server:port combo used by tests.)
19+
--agent=STRING (This designates the web browser's User Agent to use.)
20+
--extension_zip=ZIP (Load a Chrome Extension .zip file, comma-separated.)
21+
--extension_dir=DIR (Load a Chrome Extension directory, comma-separated.)
22+
--headless (The option to run tests headlessly. The default on Linux OS.)
23+
--headed (The option to run tests with a GUI on Linux OS.)
24+
--start_page=URL (The starting URL for the web browser when tests begin.)
25+
--demo_mode (The option to visually see test actions as they occur.)
26+
--demo_sleep=SECONDS (The option to wait longer after Demo Mode actions.)
27+
--highlights=NUM (Number of highlight animations for Demo Mode actions.)
28+
--message_duration=SECONDS (The time length for Messenger alerts.)
29+
--check_js (The option to check for JavaScript errors after page loads.)
30+
--ad_block (The option to block some display ads after page loads.)
31+
--verify_delay=SECONDS (The delay before MasterQA verification checks.)
32+
--disable_csp (This disables the Content Security Policy of websites.)
33+
--enable_sync (The option to enable "Chrome Sync".)
34+
--save_screenshot (The option to save a screenshot after each test.)
35+
--visual_baseline (Set the visual baseline for Visual/Layout tests.)
36+
--timeout_multiplier=MULTIPLIER (Multiplies the default timeout values.)
4137
"""
4238
name = 'selenium' # Usage: --with-selenium
4339

0 commit comments

Comments
 (0)