Selenium Click Help - Next Pages

Hello Philipp @qqilihq I’m having trouble getting the next button to work on pages. Css, Xpath, etc. I tried but I keep having problems.

It works, sometimes it doesn’t. Or for some it doesn’t work at all. Can you please help me with the best solution.

In total I want to get 30 pages of data from the list page. But I cannot switch pages.

Website : https://e-nabavki.gov.mk/PublicAccess/home.aspx#/notices

Next button tried. (It worked but then gave an error.)

The page button of each page was tried. (It worked but then gave an error.)

and for all of them, css, xpath, class name… it wasn’t a fully working workflow. Where am I making a mistake?

" Execute failed: element not interactable: element has zero size "

and

"ERROR Click Execute failed: element click intercepted: Element is not clickable at point (1252, 680). Other element would receive the click:

"

1 Like

Hey Umut,

hope you’re doing well! Your problem is caused by the overlay on the bottom of the page:

It will obscure the “next” button, and thus the “Click” node cannot execute. I suggest to fix it by removing the bottom bar from the page. For this, you can use the following Java Script code:

const element = document.getElementById("footer");
element?.parentNode.removeChild(element);

Just put this into an Execute JavaScript node and connect it after the Navigate / Start WebDriver node, which loads the page.

For the next button you can use a simple CSS selector .next > a

Best regards,
Philipp

4 Likes

Hi Philipp
Thanks for the answer. I will try this and share the result. :wink:

1 Like

Philipp @qqilihq Yes it is definitely the best solution. Thanks so much again for this instructive answer. :beer: :trophy:

Pictures for the benefit of others. Tested 3 times on 30 pages. It worked without any problems.


image

2 Likes

Great - thanks for sharing the details!

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