Skip to content

Commit 9e8552e

Browse files
committed
Add ad_block command line arg for Nosetests
1 parent 426e031 commit 9e8552e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

seleniumbase/plugins/selenium_plugin.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ def options(self, parser, env):
8383
dest='highlights', default=None,
8484
help="""Setting this overrides the default number of
8585
highlight animation loops to have per call.""")
86+
parser.add_option(
87+
'--ad_block', action="store_true",
88+
dest='ad_block_on',
89+
default=False,
90+
help="""Using this makes WebDriver block display ads
91+
that are defined in ad_block_list.AD_BLOCK_LIST.""")
8692
parser.add_option(
8793
'--verify_delay', action='store',
8894
dest='verify_delay', default=None,
@@ -114,6 +120,7 @@ def beforeTest(self, test):
114120
test.test.demo_mode = self.options.demo_mode
115121
test.test.demo_sleep = self.options.demo_sleep
116122
test.test.highlights = self.options.highlights
123+
test.test.ad_block_on = self.options.ad_block_on
117124
test.test.verify_delay = self.options.verify_delay # MasterQA
118125
test.test.timeout_multiplier = self.options.timeout_multiplier
119126
test.test.use_grid = False

0 commit comments

Comments
 (0)