Complete the code to open a browser using Selenium WebDriver.
from selenium import webdriver driver = webdriver.[1]() driver.get('https://example.com') driver.quit()
The correct way to open a Chrome browser with Selenium is webdriver.Chrome().
Complete the code to find an element by its ID using Selenium.
element = driver.find_element_by_[1]('submit-button')
To find an element by its ID, use find_element_by_id.
Fix the error in the assertion to check the page title with Selenium.
assert driver.title [1] 'Example Domain'
To verify the page title matches exactly, use the equality operator ==.
Fill both blanks to create a test that waits for an element to be clickable using Selenium's WebDriverWait.
from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC wait = WebDriverWait(driver, 10) element = wait.until(EC.[1]((By.[2], 'submit-button')))
To wait until an element is clickable, use element_to_be_clickable with the locator type ID.
Fill both blanks to create a dictionary comprehension that maps test names to their pass status from a results dictionary.
test_status = {test[1]: result for test, result in results.items() if result [2] True}The comprehension converts test names to uppercase (.upper()), keeps results as is (empty string), and filters only passed tests (== True).