Complete the code to find all buttons on the page using Selenium.
buttons = driver.find_elements_by_[1]('button')
The find_elements_by_tag_name method finds all elements with the given tag, here 'button'.
Complete the code to find all elements with class 'item' using Selenium.
items = driver.find_elements_by_[1]('item')
The find_elements_by_class_name method finds all elements with the specified class.
Fix the error in the code to find all links with tag 'a'.
links = driver.find_elements_by_[1]('a')
To find all links, use find_elements_by_tag_name with 'a' as the tag.
Fill both blanks to find all input elements with type 'checkbox'.
checkboxes = driver.find_elements_by_[1]('input[type=[2]]')
Use find_elements_by_css_selector with the CSS selector input[type=checkbox] to find all checkbox inputs.
Fill all three blanks to create a dictionary of element texts keyed by their ids for all divs with class 'card'.
cards = driver.find_elements_by_[1]('div.card') texts_by_id = {card.get_attribute([2]): card.text for card in cards if card.get_attribute([3]) is not None}
Use find_elements_by_css_selector with 'div.card' to find all divs with class 'card'. Then get their 'id' attribute and text to build the dictionary.