Complete the code to import the pytest fixture decorator.
from pytest import [1]
The fixture decorator is used to define setup and teardown code in pytest.
Complete the fixture function to initialize the Chrome browser.
import pytest from selenium import webdriver @pytest.fixture def browser(): driver = webdriver.[1]() yield driver driver.quit()
To open a Chrome browser, use webdriver.Chrome().
Fix the error in the fixture to properly close the browser after the test.
@pytest.fixture def browser(): driver = webdriver.Chrome() yield driver driver.[1]()
driver.quit() closes all browser windows and ends the session properly.
Fill both blanks to create a fixture that opens Firefox and maximizes the window before yielding.
@pytest.fixture def browser(): driver = webdriver.[1]() driver.[2]() yield driver driver.quit()
Use webdriver.Firefox() to open Firefox and maximize_window() to maximize the browser window.
Fill all three blanks to create a fixture that opens Edge, sets an implicit wait, and then yields the driver.
@pytest.fixture def browser(): driver = webdriver.[1]() driver.[2](10) yield driver driver.[3]()
Use webdriver.Edge() to open Edge, implicitly_wait(10) to wait up to 10 seconds for elements, and quit() to close the browser.