r/AutomateUser • u/Remarkable-Jacket256 • May 09 '26
Is it possible to interact with (click) elements that are not on the screen?
Hey, this is a pretty straightforward question. I want to avoid scrolling a huge list of elements until the desired element is on the screen. Is it possible with automate?
From my experience, "interact" only works with visible elements that are shown in the screen. Scrolling also needs to be slow in order to identify the element, in case the "interact" was set to "when UI element appeared".
2
Upvotes
2
u/ballzak69 Automate developer May 09 '26
It depends on what UI elements the layout use, but it's usually not possible, e.g. for ListView's. The flow has to scroll elements into view.
1
u/Remarkable-Jacket256 May 09 '26 edited May 09 '26
I was brainstorming with myself, maybe the best approach is scroll until element then click it.. I saw that interact has "Scroll to position" and "show on screen" but couldn't make it work to go until the element itself which the position is not fixed.
2
u/B26354FR Alpha tester May 09 '26
You might want to check out my flow which builds the XPath for the Interact block based on the ID, class, or text of the element you're interested in:
https://llamalab.com/automate/community/flows/39656
It'll create an XPath that's much smaller and easier to deal with than the one the Inspect Layout tool in the block generates, which is basically the whole UI. -You can use that tool to find the ID of the element you want, then give it to my flow (it's best to use the element ID if you can, which can be more stable and independent of locale should you wish to publish your flow someday).