Complete the code to start a Selenium WebDriver for Chrome.
driver = webdriver.[1]()The correct method to start a Chrome browser in Selenium is webdriver.Chrome().
Complete the code to check if the page title contains the word 'Home'.
assert 'Home' [1] driver.title
To check if 'Home' is part of the page title, use the in keyword.
Fix the error in the code to wait until an element with id 'submit' is clickable.
WebDriverWait(driver, 10).until(EC.[1]((By.ID, 'submit')))
The correct expected condition to wait for a clickable element is element_to_be_clickable.
Fill both blanks to create a test function that uses pytest and asserts page title.
def test_title(driver): driver.get('http://example.com') assert [1] [2] 'Example Domain'
The test checks if the page title exactly equals 'Example Domain' using driver.title == 'Example Domain'.
Fill all three blanks to define a pytest fixture that initializes and quits the WebDriver.
import pytest @pytest.fixture def driver(): driver = webdriver.[1]() yield [2] [3].quit()
The fixture starts a Chrome WebDriver, yields it for tests, then quits it after tests finish.