I am writing a selenium test case to automate surveymonkey.
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.options import Options
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("-incognito --no-sandbox")
driver = webdriver.Chrome(executable_path='/usr/lib64/chromium/chromedriver', chrome_options=chrome_options)
driver.get('https://www.surveymonkey.com/r/WXNXWVB')
time.sleep(3)
vote_check = driver.find_element_by_id('96247410_725897453')
vote_check.click()
time.sleep(3)
nxt_btn = driver.find_element_by_name('Done')
nxt_btn.click()
driver.quit()
And I get the flowing error:
selenium.common.exceptions.WebDriverException: Message: unknown error: Element <input id="96247410_725897453" name="96247410" type="radio" class="radio-button-input" value="725897453"> is not clickable at point (850, 203). Other element would receive the click: <span class="radio-button-display ">...</span>
What am I doing wrong?
Please Find the Below Workable code:
For Option 1:
vote_check = driver.find_element_by_xpath("//label[@for='96247410_725897453']")
For Option 2:
vote_check = driver.find_element_by_xpath("//label[@for='96247410_725897454']")
For Done:
vote_check = driver.find_element_by_xpath("//button[contains(text(), ' Done')]")
Try at your end and let me know.