web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Click until text is fo...
Power Automate
Unanswered

Click until text is found, locate text position and click

(0) ShareShare
ReportReport
Posted on by 5

Hello all,

I'm trying to create a sequence where Power Automate would load a page, scroll down until it finds a specific text and if it finds this text, locate the position and move the mouse to this position. I can do most of those elements but I don't see directly how I would link the absence of a text to an action.

 

The sequence would be something like this:
- open web page
- while text is not visible, hit {PageDown}
- move mouse to the text location
- do something (might be a click for example if the text is a link)

Do you know how I could achieve this?
I need in fact the position for two reasons:
1. Being able to click it if it's a link
2. Understand the position of the link (ex: to check the position in search engine results)

Thanks

 

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Use find text on page or whatever it is (sorry, not at my computer). On error, go to subflow. In the subflow, page down. Then go to label. Put a label before your find text, so it will loop in this until the text is found. 

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Klintistwood

     

    As indicated by @MichaelAnnis, this flow works:

    1. 'Launch new edge' (or your preferred browser). Initial URL = your page

    2. 'Move mouse to text on screen (OCR)':

    • OCR engine type = Tesseract
    • Text to find = Your text
    • Occurence = 1
    • Search for text on = Foreground window only
    • On Error: Activate Retry action if an error occurs,
      • In Advanced: Text not found on screen = New Rule, Run Subflow = PgDn

    Subflow PgDn:

    1. 'Get window', Get window = Foreground window (this give you %AutomateWindow% as variable produced)

    2. 'Focus window', Find window mode = By window instance/handle, Instance = %AutomationWindow%

    3. 'Send keys' {Next} (Page Down)

     

    It's not possible to use 'Go to/label' between a main flow and a subflow

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    I should have been more clear.  Within the OnError Parameters, you can click on "New Rule" and tell it to "Run subflow", then it always wants to know what to do after it does the New Rule.  That is where you can tell it to "Go to Label" and retry looking for the text.  This would be in the error rules of the "Move mouse to text..." so it would be able to see the Label just before it in the main flow.

     

     

    MichaelAnnis_0-1628605730175.png

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 411

#2
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard