Error-Unable to click on the object

Hello Team,

I am seeing some strange results while I replay my recording. I am trying to automate the website in which there are different href links(example, reports). Sometimes I see the click on Report link redirect to the correct page in the recording but most of the times it gives an error "Unable to click on the object ". Why am I seeing difference in results for the same recording?

Many thanks!
Sneha

There could be lots of reasons why your getting intermittent issues, Loading issues, timing issues, poor xpath locators etc. I would recommend adding a waitForElementVisible step before the click action. This is usually the cause of such inconsistent behaviour.

1 Like

Thank you. This option worked fine when clicked on a href element. So, I added “WaitForElementVisible” and it worked for that element. However, adding “WaitForElementVisible” doesn’t work for another web element (which is dropdown). I am not able to resolve the “Unable to click on object” for my dropdown. Could you please help me resolve this issue?

Thanks!

@sneha2

It’s hard to consult without the specifics, could you provide the screenshot of the Test Object’s details (locators and stuffs). Also the full text of the console log will be helpful.

Cheers !

Please find the attachment

Ok so as the error is telling you, it cant find that element on the page. Could you share the html of the element in question.

Did you use the recorder to locate or did you write your own xpath?

1 Like

Here is the HTML code.

Admin Hi Admin