2

HTML Code

My code:

driver.find_element(By.ID,"RESULT_RadioButton-7_1").click()

even i tried with Xpath as well but it did not work.

Error :

check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (28, 754). Other element would receive the click: ... (Session info: chrome=111.0.5563.65)

Can anyone please tell me the solution for that error. I have tried so many methods but didn't work.

JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
sri
  • 23
  • 2

1 Answers1

1

Keith's source code:

element = driver.find_element(By.ID,"RESULT_RadioButton-7_1");
driver.execute_script("arguments[0].click();", element)

sri's source code (with fixes):

actions = ActionChains(driver) 
source = driver.find_element(By.ID,"RESULT_RadioButton-7_1") 
actions.move_to_element(source).perform() 
JustBeingHelpful
  • 18,332
  • 38
  • 160
  • 245
  • 1
    Thank you Mac . But i am working woth python.3.11. Looks like it will work for java or JavaS right? – sri Mar 23 '23 at 06:13
  • I added the "python" tag to your question. Sorry, I didn't know which implementation of WebDriver you were using. It's been over 10 years since I worked with Selenium. They all should be similar, but the classes might be named differently and have slightly different syntax. Let me see if I can find it. – JustBeingHelpful Mar 23 '23 at 06:25
  • I have used the Actions but still script is not executing.... error : raise exception_class(message, screen, stacktrace) selenium.common.exceptions.MoveTargetOutOfBoundsException: Message: move target out of bounds (Session info: chrome=111.0.5563.65) Code: actions =ActionChains(driver) source= driver.find_element(By.ID,"RESULT_RadioButton-7_1") actions.move_to_element(source).perform() – sri Mar 23 '23 at 06:32
  • You're welcome. Another way to quickly learn Selenium before using Webdriver is to use Selenium IDE so that you perform all actions in the browser manually and the code is written for you. It's not good for complexity, but it's good for brevity purposes when learning and to generate boilerplate code. – JustBeingHelpful Mar 23 '23 at 06:42
  • One other tip. This sister site of StackExchange is where people using Selenium typically post questions. https://sqa.stackexchange.com/ – JustBeingHelpful Mar 23 '23 at 06:44