All templates
Web AutomationBeginner
Take Screenshot of a Web Page
Robomotion•Updated 11 months ago

Overview
Opens a URL in a browser and saves a screenshot of the rendered page to disk.
Take Screenshot of a Web Page
Taking screenshots is a valuable ability in web flows, as users can store and share the current state of a web page. A typical scenario where screenshots are needed is logging. Robomotion provides a dedicated node to take screenshots of whole web pages or specific web elements.
What Take Screenshot of a Web Page can do
- Input Dialog titled
Take screenshot of a website, messagePlease provide the website address to take screenshot of.., defaultrobomotion.io->msg.url_input. - Normalise input (
Core.Programming.Function,outputs: 2) — cancel short-circuits toCore.Flow.Stop; otherwise trim, prependhttps://if missing, store asmsg.url. - Build paths (
Core.Programming.Function) —msg.desktop_path = global.get('$Home$') + '\Desktop',msg.screenshot_path = msg.desktop_path + '\ScreenShot.png', initialisemsg.retry_count = 0. - Launch browser (
Core.Browser.Open,chrome, maximised) ->msg.browser_id, open the URL (Core.Browser.OpenLink, timeout 60) ->msg.page_id. - Take screenshot (
Core.Browser.Screenshot) saving tomsg.screenshot_path, thenCore.Browser.Closeonmsg.browser_id. - Timestamp via
Robomotion.DateTime.Now(RFC3339, Local) ->msg.now, formatted (Robomotion.DateTime.Format, layout2006-01-02@03-04) ->msg.stamp. - Rename (
Core.FileSystem.Move,continueOnError: true) tomsg.renamed_path = msg.desktop_path + '\ScreenShot-' + msg.stamp + '.png', thenCore.Dialog.MessageBoxtitledScreenshot taken!showingmsg.dialog_text. Core.Trigger.Catcharound the launch/open pair — incrementsmsg.retry_count, sleeps 2s, andCore.Flow.GoToback to the retry label; after one retry it stops withfailed.
Behind the scenes
- Screenshot filename format
ScreenShot-yyyy-MM-dd@hh-mm.png— the@between date and time is deliberate so timestamps sort cleanly without colliding with filesystem separators. Core.Browser.Screenshotcaptures the rendered page via thepage_id, so the maximised browser window determines the viewport before the shot is taken.
More web automation templates
See all 20 →- Any browser: Edge and FirefoxA browser flow built from Web Automation nodes that signs in to Acme ERP Web and searches the customers, run on a robot in Edge and then in Firefox, with only the Browser Type changed.
- Headless ChromeThe Web Inspector lesson's flow, run first headed so you can watch it, then headless with Record Session, so the robot keeps a video of the run nobody saw.
- Payment Run with Hold ReportRuns the weekly vendor payment run in a SAP-style ERP and then accounts for every bill it refused to pay. Signs in with credentials read from the Robomotion Vault, proposes the bills due within seven days, confirms the run so a journal entry is posted per document, and verifies the posted summary against the proposal before going on. Then it opens the bills list, filters to the blocked bills, and reports each one with the reason it is on hold - a pending goods receipt, a quantity or price mismatch against the purchase order, or a missing PO reference. Writes a two-section CSV covering what was paid and what was held back, with the value held back totalled.
- Shipment Status ReportSigns in to a carrier portal and sweeps every page of the shipments list into one report, then narrows that sweep to the shipments that need a person. Reads the login from the Robomotion Vault, walks the pager with a Label and a GoTo until the Next control is disabled, and writes two CSVs: the full book, and an exceptions file covering customs holds, failed deliveries and delays, oldest booking first, with the billed value stuck in each one. Closes with a Log line carrying the counts and the total.
- Bank ReconciliationTakes the payments and receipts the ERP could not reconcile and confirms each one against the real bank statement. It pulls the ERP's flagged paid-bill exceptions and open invoices awaiting cash, then signs in to the bank, searches the operating account by reference and reads what actually settled - quantifying the four ways money and ledger drift apart: a missing payment, a transposed amount, a double payment and unapplied cash. Writes a reconciliation CSV. The story is evidence: the ledger raises the question, the bank statement answers it, and every discrepancy comes out with a number attached.
- Logistics Exception CenterBuilds one worklist of every active delivery exception from the carrier, then dedupes it against the systems that may already be handling it - the mailbox that was notified, and the help desk where a ticket may already exist. Joining the three on the tracking number tells the robot which exceptions were mailed, which already have a ticket, and which nobody has picked up yet. Writes a consolidated exception CSV. The story is consolidation: three systems each hold part of the picture, and the robot joins them so a stuck shipment is neither missed nor double-worked.