Reputation: 107
I am trying to select the radio button "Hitter". Could anyone help? I've tried a lot of different things, but keep getting "Message: element not visible".
Thanks!
Upvotes: 4
Views: 8121
Reputation: 474281
There are multiple ways to locate the radio input
, here is the one using find_element_by_id()
:
radio = driver.find_element_by_id("ContentPlaceHolder1_HitterRadioButton")
radio.click()
Or, if you have problems with this approach, you can simulate a click via javascript:
radio = driver.find_element_by_id("ContentPlaceHolder1_HitterRadioButton")
driver.execute_script("arguments[0].click();", radio)
Upvotes: 7