Skip to content

Commit 6a57525

Browse files
committed
Demo Mode for the Docker Selenium plugin
1 parent 9995c39 commit 6a57525

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

seleniumbase/plugins/docker_selenium_plugin.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,15 @@ def options(self, parser, env):
4343
default='4444',
4444
help="""Designates the port used by the test.
4545
Default: 4444.""")
46+
parser.add_option('--demo_mode', action="store_true",
47+
dest='demo_mode',
48+
default=False,
49+
help="""Using this slows down the automation so that
50+
you can see what it's actually doing.""")
51+
parser.add_option('--demo_sleep', action='store', dest='demo_sleep',
52+
default=None,
53+
help="""Setting this overrides the Demo Mode sleep
54+
time that happens after browser actions.""")
4655

4756
def configure(self, options, conf):
4857
super(SeleniumBrowser, self).configure(options, conf)
@@ -59,6 +68,8 @@ def beforeTest(self, test):
5968
self.driver = self.__select_browser()
6069
test.test.driver = self.driver
6170
test.test.browser = "firefox"
71+
test.test.demo_mode = self.options.demo_mode
72+
test.test.demo_sleep = self.options.demo_sleep
6273
except Exception as err:
6374
print "Error starting/connecting to Selenium:"
6475
print err

0 commit comments

Comments
 (0)