Complete the code to get the page title using Selenium WebDriver.
title = driver.[1]The title attribute of the driver returns the current page's title as a string.
Complete the code to get the current URL of the page using Selenium WebDriver.
url = driver.[1]The current_url attribute of the driver returns the URL of the current page as a string.
Fix the error in the code to correctly print the page title.
print(driver.[1])
The title is an attribute, not a method, so it should not have parentheses.
Fill both blanks to store the page title and URL in variables.
page_title = driver.[1] page_url = driver.[2]
url instead of current_url.driver.title gets the page title, and driver.current_url gets the current page URL.
Fill all three blanks to print the page title and URL, then assert the URL contains 'example'.
print('Title:', driver.[1]) print('URL:', driver.[2]) assert 'example' [3] driver.current_url
Use driver.title and driver.current_url to print values. The in keyword checks if 'example' is part of the URL string.