fix and add som usecases
This commit is contained in:
@@ -10,8 +10,17 @@ def driver():
|
||||
Initializes and returns a Chrome WebDriver instance for each test function.
|
||||
Automatically quits the driver after the test function completes.
|
||||
"""
|
||||
# Initialize the Chrome WebDriver
|
||||
driver = webdriver.Chrome()
|
||||
# Configure Chrome options to disable the password manager and related pop-ups
|
||||
chrome_options = webdriver.ChromeOptions()
|
||||
prefs = {
|
||||
"credentials_enable_service": False,
|
||||
"profile.password_manager_enabled": False
|
||||
}
|
||||
chrome_options.add_experimental_option("prefs", prefs)
|
||||
chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
|
||||
|
||||
# Initialize the Chrome WebDriver with the specified options
|
||||
driver = webdriver.Chrome(options=chrome_options)
|
||||
|
||||
# Maximize the browser window
|
||||
driver.maximize_window()
|
||||
|
||||
Reference in New Issue
Block a user