Complete the code to import the Selenium WebDriver module.
from selenium import [1]
The correct import to use Selenium WebDriver is webdriver. This module allows controlling browsers.
Complete the code to create a Chrome WebDriver instance.
driver = webdriver.[1]()To launch Chrome browser, use webdriver.Chrome(). This creates a Chrome WebDriver instance.
Fix the error in the code to open a webpage with Selenium.
driver.get([1])The URL must be a string enclosed in quotes. So 'https://example.com' is correct.
Fill both blanks to wait 5 seconds before closing the browser.
import time time.[1](5) driver.[2]()
time.sleep(5) pauses execution for 5 seconds.driver.quit() closes all browser windows and ends the session.
Fill all three blanks to find an element by its ID and click it.
from selenium.webdriver.common.by import [1] element = driver.find_element([2], [3]) element.click()
By.ID.Import By to specify locator types.
Use By.ID to find element by ID.
Provide the exact ID string, e.g. 'submit-button'.