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 / Help needed taking scr...
Power Automate
Answered

Help needed taking screenshot of UI element - always fails.

(0) ShareShare
ReportReport
Posted on by

Hello Everyone.

 

I have a flow that opens Excel, populates data automatically in a table and then goes to a second Excel tab, where a graph is there from the data, and I want it to then take a screenshot of the graph.

 

I use the Take screenshot of UI element action for this.  I click the chart area of the graph and then save it to a file.

 

The issue is that the flow never seems to take the screenshot and just fails with the error 'failed to take screenshot of UI element'.

 

I can see the element on the screen as I type this thread.

 

I went in to the UI settings of the captured UI element (Local Computer > Window 'Data - Excel' > Image 3) and investigated the selector.  When I tested it it selects the correct Excel chart area, as expected.

 

I even put in a 60 second delay to slow everything down during this process - can anyone give me tips on how to get the screenshot to actually be taken?

 

I did manage to get it working once, but the screenshot was just black, even though the UI element was clearly visible on the screen.

Many thanks.

I have the same question (0)
  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Can you share a screenshot of the element selector from PAD?

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution.

    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • CU-19081228-9 Profile Picture
    on at

    @Agnius is this what you are after?  Thanks.

     

    Selector.png

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Yes. Is the chart name always the same? Can it fail because of you trying to capture a different chart?

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution.

    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • CU-19081228-9 Profile Picture
    on at

    @Agnius The chart comes from a spreadsheet in a different tab.  

     

    Each time my flow runs it adds a new row of data to the Excel spreadsheet which then means that the chart updates too but it's essentially the same chart - would that be an issue?

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I don't think it should. Does the name of the Excel file change?

    -------------------------------------------------------------------------

    If I have answered your question, please mark it as the preferred solution.

    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

     

  • CU-19081228-9 Profile Picture
    on at

    No, the file is always the same.  I'm completely stumped.

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I am able to take a screenshot of the chart successfully. The selector is the same, except for the name of the Excel file and the sheet, as I didn't bother to rename them. The ordinal value of the image is 3 and not 1 like in your case, though. Not sure if that makes any difference, but perhaps you captured a part of your chart and not its entirety. I've tried disabling the ordinal property and it failed, but with it being set to eq(3) it works fine.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution.
    If you like my response, please give it a Thumbs Up.

    If you are interested in Power Automate, you might want to follow me on LinkedIn at https://www.linkedin.com/in/agnius-bartninkas/

  • CU-19081228-9 Profile Picture
    on at

    Thank you @Agnius for taking the time to help, I appreciate it.

     

    I am just running my flow after making a few changes, the changes I have made are:

     

    1 - Filtering the Excel data to show data from today only, which will reflect in the graph (maybe too much data was a thing?)

    2 - Setting Power Automate to screenshot the entire Excel window, not just the chart element.

     

    I'll let you know the results - thank you!

  • CU-19081228-9 Profile Picture
    on at

    @Agnius This approach of capturing the Excel window instead seems to have worked, I also added some steps to make sure the window was focused before the screenshot was taken.

     

    Thank you so much for all your help and suggestions!

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 252 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard