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 / How to detect the cont...
Power Automate
Answered

How to detect the content of a page (offline)

(0) ShareShare
ReportReport
Posted on by

With the Microsoft Power Automate Desktop (MPAD) , I am trying to interact with the following web page: "https://mydomain.anycountry.com.ru/"

To be able to load this page, you need to first open a vpn, but I am trying to detect when launching the browser on said url, if the page does not load, open the vpn program

but the MPAD does not allow me to interact when the page does not load (the vpn connection is closed) I tried to add the element of MPAD

`if the page contains the element`

but the MPAD does not allow me to select any element on the page

Also try to execute a javascript to detect in this case the "reload" button with the instruction:

bolean_var = document.body.contains(document.querySelector("#reload-button"));

return bolean_var;

 

I also do not understand why the page does not allow me to execute javascript when it is offline or the vpn connection is closed

 

I even try to run something like alert('hello World'); and it doesn't run either, I don't understand why

 

Any recommendation?

 

in summary:

I need to declare a condition if the page does not load open the vpn connection

  • Verified answer
    PhilipTreacy Profile Picture
    120 on at

    Hi @aguiarima 

     

    Create a subflow that starts the VPN, then in your main flow you want to call that subflow if the website does not load.  So in the step that loads the URL, click on On error

    pavpn1.png

     

    The Advanced and New Rule -> Run Subflow 

    pavpn2.png

     

     

    Choose the subflow you created to start the VPN

     

    pavpn3.png

     

    Once the VPN starts you can try loading the website again.

     

    Regards

     

    Phil

  • aguiarima Profile Picture
    on at

    Thank You!

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 Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
11manish Profile Picture

11manish 298 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 289

#3
Henil Profile Picture

Henil 125

Last 30 days Overall leaderboard