@@ -52,6 +52,7 @@ def pytest_addoption(parser):
52
52
--guest (The option to enable Chrome's Guest mode.)
53
53
--devtools (The option to open Chrome's DevTools when the browser opens.)
54
54
--reuse-session (The option to reuse the browser session between tests.)
55
+ --crumbs (Option to delete all cookies between tests reusing a session.)
55
56
--maximize (The option to start with the web browser maximized.)
56
57
--save-screenshot (The option to save a screenshot after each test.)
57
58
--visual-baseline (Set the visual baseline for Visual/Layout tests.)
@@ -390,6 +391,13 @@ def pytest_addoption(parser):
390
391
default = False ,
391
392
help = """The option to reuse the selenium browser window
392
393
session between tests.""" )
394
+ parser .addoption ('--crumbs' ,
395
+ action = "store_true" ,
396
+ dest = 'crumbs' ,
397
+ default = False ,
398
+ help = """The option to delete all cookies between tests
399
+ that reuse the same browser session. This option
400
+ is only needed when using "--reuse-session".""" )
393
401
parser .addoption ('--maximize_window' , '--maximize-window' , '--maximize' ,
394
402
'--fullscreen' ,
395
403
action = "store_true" ,
@@ -478,6 +486,7 @@ def pytest_configure(config):
478
486
sb_config .guest_mode = config .getoption ('guest_mode' )
479
487
sb_config .devtools = config .getoption ('devtools' )
480
488
sb_config .reuse_session = config .getoption ('reuse_session' )
489
+ sb_config .crumbs = config .getoption ('crumbs' )
481
490
sb_config .shared_driver = None # The default driver for session reuse
482
491
sb_config .maximize_option = config .getoption ('maximize_option' )
483
492
sb_config .save_screenshot = config .getoption ('save_screenshot' )
0 commit comments