0

There is button in an web application, where i can able to click it manually but when i am clicking it using python selenium at that particular point i am getting this exceptional error saying

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (700, 3284)

and the XPATH I have used to to click that particular place is

driver.find_element(By.XPATH, "(//a\[@title='Character create'\])\[44\]").click()

and the HTML code, where I used those attributes and its values are from the following code

click to see the image of HTML code for that XPATH

<a href="https://igs.imarticus.org/stratonboardportal/uatinternal/DataEntry/GameConfiguration/gamecharacterlist/101" title="Character create" class="btn outline_btn mb-2 px-4 text-center"><i class="fas fa-wrench"></i></a>

click to see the exception message as image

What I am missing here?

Even I have given enough time around more that 20 seconds before and after to that specific XPATH like time.sleep(20) and also tried driver.implicietly_wait(20)

the co-ordinates where actually I am clicking using python selenium is at {'x': 669, 'y': 3266}, I have found these co-ordinates using the following syntax.

driver.find_element(By.XPATH, "(//a\[@title='Character create'\])\[44\]").location

but the error it is displaying is at (700,3284).

can any one please help me in this?

When I am locating the element where i want click it is throwing an exception error message as

selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//a[text()=' Add Character']"}

when I am clicking there, it is throwing an exception error message as

selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element is not clickable at point (700, 3284)

So, when ever I click on that button no error message should come and i should able to proceed to its respective UI.

1
  • that happens when there's something above it that would receive the click. Try the javascript solution or just navigate to the url Commented Feb 25, 2023 at 0:13

1 Answer 1

0

Try if clicking the element using JavaScript works, try the below code to click on the desired element:

element = driver.find_element(By.XPATH, "(//a[@title='Character create'])[44]")
driver.execute_script("arguments[0].click();", element)
Sign up to request clarification or add additional context in comments.

4 Comments

hey, thank you. Shawn it's working wow, thank you so much. can you tell me what syntax you have used in driver.execute_script("arguments[0].click();", element)
Sometimes selenium alone cannot perform actions(for example clicking a button) due to various reasons. In these cases, we can take help of JavaScript to do the action. execute_script() method executes Javascript in the current window. For more details about execute_script() refer this stackoverflow.com/questions/64987951/…. You can upvote/accept this answer if the answer provided has solved your issue, this will help those who are in the same boat as you and are looking for answers.
Refer this also, you will understand the difference between selenium's click() and Javascript's click(). stackoverflow.com/questions/34562061/…
sure, definetly

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.