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 / Error remarks on Scree...
Power Automate
Unanswered

Error remarks on Screenshot

(0) ShareShare
ReportReport
Posted on by 49

Hey everyone,

I need your assistance and advice regarding an issue I've encountered multiple times. I'm trying to screenshot an entire page of a website and save it in a folder. However, every time I attempt to take the screenshot, I encounter an error message. here a picture of the flow and error message.

FLT_Rizki_0-1710472996655.png

I have the same question (0)
  • Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at

     

    WebAutomation.LaunchChrome.LaunchChrome Url: $'''https://www.solidworks.com/sw/support/SubscriptionServices.html?GUID=4''' WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False WaitForPageToLoadTimeout: 60 Timeout: 60 PiPUserDataFolderMode: WebAutomation.PiPUserDataFolderModeEnum.AutomaticProfile BrowserInstance=> Browser
    Folder.GetSpecialFolder SpecialFolder: Folder.SpecialFolder.DesktopDirectory SpecialFolderPath=> SpecialFolderPath
    WAIT 4
    WebAutomation.TakeScreenshot.TakeScreenshotSaveToFile BrowserInstance: Browser File: $'''%SpecialFolderPath%\\abc''' FileFormat: WebAutomation.FileFormat.Jpg
    

    Hi @FLT_Rizki ,

    For me working as expected. Please try with above code.

    Instead of wait you can try for wait for web page content it will wait until the page load.

     

    Ahammad_Riyaz_1-1710475582535.png

     

     

     

     

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

    Regards,
    Riyaz

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @FLT_Rizki ,

     

    If the above action is not working you can use the alternative action called "Take Screenshot (in Workstation)".

     

    VishnuReddy1997_0-1710477297403.png

     

    Thanks,
    Vishnu Reddy

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers

     

     

     

  • Deenuji_Loganathan_ Profile Picture
    6,255 Moderator on at

    @FLT_Rizki 

    While capturing the screenshot, please refrain from interrupting your bot to prevent it from displaying "Failed to capture." Also, ensure that you activate the highlighted toggle below.

     

    Deenuji_0-1710484275203.png

     


    Thanks,
    Deenuji Loganathan
    🤖 Automation Evangelist
    Deenuji - Follow me on LinkedIn

    -------------------------------------------------------------------------------------------------------------
    If I've helped solve your query, kindly mark my response as the solution ✔ and give it a thumbs up!👍 Your feedback supports future seekers 🌟

  • FLT_Rizki Profile Picture
    49 on at

    Hey everyone,

    I appreciate all the advice given, but unfortunately, none of the solutions worked for me. Is there any other method you can suggest? I suspect the issue might be related to the file aspect.

  • Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at

    Did you tried the code what i was pasted in chat.

  • FLT_Rizki Profile Picture
    49 on at

    Yes, I did, and the error message states "fail to save screenshot to file."

  • Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at

    Did that website got loaded.

  • FLT_Rizki Profile Picture
    49 on at

    yes it did.

  • Riyaz_riz11 Profile Picture
    4,150 Super User 2026 Season 1 on at

    Can you please share the screenshot action just open it.

    Meanwhile hardcode the save path and try with some other page. ex: www.google.com.

    If that works then the issue may be the website, what you are using.

     


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

    Regards,
    Riyaz

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2026 Season 1 on at

    Hi @FLT_Rizki ,

     

    If the action is not working your system some problem with Browser or Instance, I guess.

    You can take screenshot using Python script also as shown in below image. But you also need some prerequisites.

    "You need to have Python installed on the machine and If your script uses external Python libraries (modules), you might need to install those libraries as well(pip install pygetwindow pyautogui)"

     

    image (9).pngimage (10).png

     

    Python script:

    import pygetwindow as gw
    import pyautogui

    # Get the active foreground window
    active_window = gw.getActiveWindow()

    if active_window is not None:
    # Get the position and size of the active window
    x, y, width, height = active_window.left, active_window.top, active_window.width, active_window.height

    # Capture the screenshot of the active window
    screenshot = pyautogui.screenshot(region=(x, y, width, height))

    # Save the screenshot to the specified location
    screenshot_path = r"D:\Power_Automate\Test\screenshot.png"
    screenshot.save(screenshot_path)

    print("Screenshot saved successfully at:", screenshot_path)
    else:
    print("No active foreground window found.")

     

     

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Vishnu Reddy

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 784

#2
Valantis Profile Picture

Valantis 581

#3
Haque Profile Picture

Haque 545

Last 30 days Overall leaderboard