Failed clicking html element

Hi Peeps,

Greetings!

I recently encountered " Failed clicking html element" error, and I observe this occurrence through a long iteration, say 60 and up, not consistently, though. This is even though I am utilizing “wait for ready” feature in a get element.

Any advise so I avoid such?

The automation is iterating through a csv file, reading web page, copying specific data field then clicking link … or should I rather use open URL?

Massive thanks,
Dante

It depends on the reason you are getting the failed to locate element error.
If the reason is the page is not done rendering, as you suggest, then wait for ready is not the solution.
wait for ready waits for the browser to report it has loaded all elements, that is not the same as the page is done rendering. Most webpages nowadays have a JavaScript application that loads data and needs to initialize before showing anything, and the browser has no control or knowledge about that.

The solution in that case is to use “get element” on something you know will only be visible once the page is loaded and ready. Sometimes that can be tricky if the element you are searching for is hidden using unconventional methods, but most of the time, this is relatively straightforward.

Hi Allan,

I am not getting the failed to locate element error.

Let me explore that suggestion of yours, an element that sure to be present when page is completely loaded and ready.

Massive thanks,
Dante

Sorry, I misread the error message.
So it finds the element, but clicking fails.
Could that still be from the page not being fully loaded? If so, then try my suggestion. Is this a virtual click or with virtual set to false?

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.