How to scroll until image is found for XClick or XClickRelative?

This is for a forum-style site. I am able to navigate to the list of URI’s, but you usually need to scroll down to find the element that I want to click (a reply button). The amount that you have to scroll is not standard either between or within each URI, it’s totally variable and changes all the time.

Additionally, there may be more than 1 of the element present on each URI and I’m only interested in the first occurrence.

How can I get UI Vision to scroll down until the first occurrence is reached, then click it to launch the modal overlay that it should be taking the next action upon?

Is the image/text (that you look for) already on the page, or does it get loaded during scrolling? That would be like the infinite page scroll that we also see on the social networking sites like Facebook or Twitter.

It’s another social network site with potentially infinite scroll.

Can you use web selenium ide web commands for automation, or do you need to use XClick?

With web commands, the also work “below the fold” and automatically scroll to the first occurrence.

Ok, then the solution might be this: Handle dynamic Xpath

See also How to get the Selenium IDE commands to work with dynamic ID's

1 Like

Thanks, I think that solves the scrolling issue for me!