Complete the code to check if the element is visible on the page.
element = driver.find_element(By.ID, "submit-btn") if element.[1](): print("Button is visible")
The is_displayed() method checks if the element is visible on the page.
Complete the code to check if the checkbox is selected.
checkbox = driver.find_element(By.NAME, "agree") if checkbox.[1](): print("Checkbox is checked")
The is_selected() method returns True if the checkbox or radio button is selected.
Fix the error in the code to check if the button is enabled.
button = driver.find_element(By.CLASS_NAME, "btn-primary") if button.[1](): print("Button is clickable")
The correct method to check if a button is enabled (clickable) is is_enabled().
Fill both blanks to create a dictionary of element states for a checkbox.
checkbox = driver.find_element(By.ID, "subscribe") states = { "visible": checkbox.[1](), "enabled": checkbox.[2]() }
Use is_displayed() to check visibility and is_enabled() to check if the element can be interacted with.
Fill all three blanks to create a test that checks if a radio button is visible, enabled, and selected.
radio = driver.find_element(By.CSS_SELECTOR, "input[type='radio']") if radio.[1]() and radio.[2]() and radio.[3](): print("Radio button is ready and selected")
Check visibility with is_displayed(), enabled state with is_enabled(), and selection with is_selected().