Update an example test
This commit is contained in:
parent
e7f535895d
commit
b1c305ab18
|
@ -6,11 +6,19 @@ class OverrideDriverTest(BaseCase):
|
|||
def get_new_driver(self, *args, **kwargs):
|
||||
"""This method overrides get_new_driver() from BaseCase."""
|
||||
options = webdriver.ChromeOptions()
|
||||
options.add_experimental_option(
|
||||
"excludeSwitches", ["enable-automation"]
|
||||
)
|
||||
options.add_argument("--disable-3d-apis")
|
||||
options.add_argument("--disable-notifications")
|
||||
if self.headless:
|
||||
options.add_argument("--headless")
|
||||
options.add_argument("--disable-gpu")
|
||||
options.add_experimental_option(
|
||||
"excludeSwitches", ["enable-automation", "enable-logging"],
|
||||
)
|
||||
prefs = {
|
||||
"credentials_enable_service": False,
|
||||
"profile.password_manager_enabled": False,
|
||||
}
|
||||
options.add_experimental_option("prefs", prefs)
|
||||
return webdriver.Chrome(options=options)
|
||||
|
||||
def test_simple(self):
|
||||
|
|
|
@ -191,11 +191,19 @@ class OverrideDriverTest(BaseCase):
|
|||
def get_new_driver(self, *args, **kwargs):
|
||||
"""This method overrides get_new_driver() from BaseCase."""
|
||||
options = webdriver.ChromeOptions()
|
||||
options.add_experimental_option(
|
||||
"excludeSwitches", ["enable-automation"]
|
||||
)
|
||||
options.add_argument("--disable-3d-apis")
|
||||
options.add_argument("--disable-notifications")
|
||||
if self.headless:
|
||||
options.add_argument("--headless")
|
||||
options.add_argument("--disable-gpu")
|
||||
options.add_experimental_option(
|
||||
"excludeSwitches", ["enable-automation", "enable-logging"],
|
||||
)
|
||||
prefs = {
|
||||
"credentials_enable_service": False,
|
||||
"profile.password_manager_enabled": False,
|
||||
}
|
||||
options.add_experimental_option("prefs", prefs)
|
||||
return webdriver.Chrome(options=options)
|
||||
|
||||
def test_simple(self):
|
||||
|
|
Loading…
Reference in New Issue