Complete the code to find an element by its name attribute.
element = driver.find_element_by_[1]("username")
The find_element_by_name method locates an element using its name attribute.
Complete the code to send text to an input field found by name.
driver.find_element_by_[1]("email").send_keys("test@example.com")
To send text to an input, first find the element by its name attribute, then use send_keys.
Fix the error in the code to correctly find an element by name.
element = driver.find_element_by_[1]("password")
The find_element_by_name method locates an element using its name attribute.
Fill both blanks to create a dictionary comprehension that maps element names to their text.
elements = driver.find_elements_by_[1]("item") texts = {el.get_attribute([2]): el.text for el in elements}
First, find elements by their name attribute. Then get each element's name attribute as the key in the dictionary.
Fill all three blanks to find an element by name, check if it is displayed, and assert it is visible.
element = driver.find_element_by_[1]("submit") visible = element.is_[2]() assert visible is [3]
Use find_element_by_name to locate the element. Then check if it is displayed with is_displayed(). Finally, assert that the element is visible by comparing to True.