Skip to content

Commit 5b6d7b5

Browse files
committed
Update an example
1 parent 0821783 commit 5b6d7b5

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

examples/raw_parameter_script.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
""" The main purpose of this file is to demonstrate running SeleniumBase
22
scripts without the use of Pytest by calling the script directly
3-
with Python or from a Python interactive interpreter. Based on
4-
whether relative imports work or don't, the script can autodetect
5-
how this file was run. With pure Python, it will initialize
6-
all the variables that would've been automatically initialized
7-
by the Pytest plugin. The setUp() and tearDown() methods are also
8-
now called from the script itself.
3+
with Python or from a Python interactive interpreter.
4+
Based on whether relative imports work or don't work, this script
5+
can autodetect how this file was run. With pure Python, it
6+
initializes all the variables that would've been automatically
7+
initialized by the Pytest plugin. The setUp() and tearDown() methods
8+
are also now called from the script itself.
9+
10+
(Note: The SB() and Driver() formats make this example obsolete.)
911
1012
One big advantage to running tests with Pytest is that most of this
1113
is done for you automatically, with the option to update any of the
1214
parameters through command-line parsing. Pytest also provides you
1315
with other plugins, such as ones for generating test reports,
1416
handling multithreading, and parametrized tests. Depending on your
1517
specific needs, you may need to call SeleniumBase commands without
16-
using Pytest, and this example shows you how.
18+
using Pytest, and this example shows you one way of doing that.
1719
"""
20+
1821
pure_python = False
1922
try:
2023
# Running with Pytest / (Finds test methods to run using autodiscovery)
@@ -33,9 +36,11 @@
3336
sb.browser = "chrome"
3437
sb.is_behave = False
3538
sb.headless = False
39+
sb.headless1 = False
3640
sb.headless2 = False
3741
sb.headed = False
3842
sb.xvfb = False
43+
sb.xvfb_metrics = None
3944
sb.start_page = None
4045
sb.locale_code = None
4146
sb.protocol = "http"
@@ -79,9 +84,11 @@
7984
sb.esc_end = False
8085
sb.use_wire = False
8186
sb.enable_3d_apis = False
87+
sb.window_position = None
8288
sb.window_size = None
8389
sb.maximize_option = False
8490
sb.visual_baseline = False
91+
sb.disable_cookies = False
8592
sb.disable_features = None
8693
sb._disable_beforeunload = False
8794
sb.save_screenshot_after_test = False

0 commit comments

Comments
 (0)