@@ -13,12 +13,18 @@ class BaseClass(BaseCase):
13
13
def get_new_driver (self , * args , ** kwargs ):
14
14
"""This method overrides get_new_driver() from BaseCase."""
15
15
options = webdriver .ChromeOptions ()
16
+ options .add_argument ("--disable-notifications" )
16
17
if self .headless :
17
18
options .add_argument ("--headless=new" )
18
19
options .add_argument ("--disable-gpu" )
19
20
options .add_experimental_option (
20
- "excludeSwitches" , ["enable-automation" ],
21
+ "excludeSwitches" , ["enable-automation" , "enable-logging" ],
21
22
)
23
+ prefs = {
24
+ "credentials_enable_service" : False ,
25
+ "profile.password_manager_enabled" : False ,
26
+ }
27
+ options .add_experimental_option ("prefs" , prefs )
22
28
return webdriver .Chrome (options = options )
23
29
24
30
def setUp (self ):
@@ -63,9 +69,19 @@ def tearDown(self):
63
69
def test_override_fixture_no_class (sb ):
64
70
sb .open ("https://seleniumbase.io/demo_page" )
65
71
sb .type ("#myTextInput" , "This is Automated" )
72
+ sb .set_value ("input#mySlider" , "100" )
73
+ sb .select_option_by_text ("#mySelect" , "Set to 100%" )
74
+ sb .click ("#checkBox1" )
75
+ sb .drag_and_drop ("img#logo" , "div#drop2" )
76
+ sb .click ('button:contains("Click Me")' )
66
77
67
78
68
79
class TestOverride :
69
80
def test_override_fixture_inside_class (self , sb ):
70
81
sb .open ("https://seleniumbase.io/demo_page" )
71
82
sb .type ("#myTextInput" , "This is Automated" )
83
+ sb .set_value ("input#mySlider" , "100" )
84
+ sb .select_option_by_text ("#mySelect" , "Set to 100%" )
85
+ sb .click ("#checkBox1" )
86
+ sb .drag_and_drop ("img#logo" , "div#drop2" )
87
+ sb .click ('button:contains("Click Me")' )
0 commit comments