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 / IF Block running even ...
Power Automate
Unanswered

IF Block running even if condition not met

(0) ShareShare
ReportReport
Posted on by

I am trying to build a flow using an IF statement that evaluates a webpage message following an action.

 

Here's the sequence of events:

  • Set filters
  • Run filters
  • Wait for message to appear
  • Evaluate message- the message will be either a) "No file to download" or "Save Files"
  • Choose action based on message

 

In my flow, I have the IF statement set to:

If Web Page Contains: If UI Element contains Span: No File to Download, Go To Label, End

After the end, I have the sequence for saving the file.

afdepm_1-1670180509074.png

 

However, the flow is jumping to the label, even with the IF test fails (i.e. the window says "Save Files", which would be a FALSE result)

afdepm_2-1670180574255.png

 

I have tried everything I can thing of, but continue to get the same result.  Any suggestions are appreciated.

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

    I am not an expert on html, but I bet the element still exists, such as “Show Download Button is False” (in plain English), contains “Download Button” would still exist within the HTML. 

    instead of “if web page contains” try “if web element exists” because this should have to be more specific to what is on the visible spectrum (I think)

     

    best of luck!

  • afdepm Profile Picture
    on at

    This is as close as I can find to what you are describing

    • Action: If web page contains
    • Check if web page: Contains Element
    • UI Element: the Span that indicates if a file is available to download

    afdepm_0-1670187896781.png

    Thank you for the quick reply

  • VJR Profile Picture
    7,635 on at

    Hi @afdepm 

     

    Some options you can try are

    i. Instead of span see if you can make use of any other html element

    ii. See if you can read that text by using "Get details of element on web page" and then do the text comparison.

    Meaning - get the Text and check if that text is "No file to download" or "Save Files".

    Add a On block error such that if the element is not found then it would take a specific route. 

     

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 664

#2
Haque Profile Picture

Haque 460

#3
Valantis Profile Picture

Valantis 357

Last 30 days Overall leaderboard