Automate a Website With No API: Log In and Download Invoices Daily
By Steven Van ·
The guide compares Playwright, RPA and a browser agent for daily portal downloads, covering login reuse, 2FA, scheduling, file saving and costs.
Browser Use has published a guide to automating a supplier portal that has no API, using daily invoice downloads as the example. It says to ask the supplier for a feed first (an export, an API, an SFTP drop or invoices by email), and to check the portal's terms of use and your contract before automating, since some forbid automated access.
Three ways to automate the portal
- Playwright or Selenium script plus cron: free under Apache-2.0, plus the machine it runs on. A changed selector fails the run until it is fixed. A saved session (storageState or a persistent context) skips login while valid, but TOTP needs your own code. Scheduling is cron, GitHub Actions or Task Scheduler.
- RPA with UiPath or Power Automate: flows are built in the vendor's designer on a robot machine. UiPath has a free Community tier, Basic from $25/month, and unattended RPA as an add-on. Power Automate costs $150 per bot per month, billed yearly, for unattended runs.
- Browser agent with a saved profile (Browser Use Cloud): a plain-English task, a saved profile and a short script to fetch the files. Cost is model tokens plus 20% on every run, plus $0.02 per browser-hour and traffic.
Browser Use, which makes the third option, says Playwright is the better fit for one stable portal if a developer is available, since it costs nothing per run and behaves the same way each time. It suggests RPA for teams already running UiPath or Power Automate, or when the job also touches Windows desktop apps. A browser agent suits many portals, changing layouts, or teams that do not want to maintain selectors, with the trade-off that tokens are paid on every run and the output needs checking.
RPA limits
Power Automate's unattended runs need a Process license or pay-as-you-go, and one licensed bot runs one desktop flow at a time. UiPath's serverless cloud robots stop each job at 15 minutes.
The Playwright version
The post includes a script using launchPersistentContext with a ./portal-profile folder. The first run is LOGIN=1 node invoices.mjs: log in in the window, then press Resume. Later runs reuse the profile headless. The script throws if it lands on the login page, fails if no invoice links appear, waits for the download event before each click, and saves files before the context closes, because downloads are deleted when it closes. Selenium works the same way with Chrome's --user-data-dir.
The Browser Use Cloud version
- Save the login in a profile. Create a profile under Dashboard Profiles, log in once in a browser that uses it, and keep the profile ID. The login is saved when that browser stops.
- Put the credentials in 1Password. Use a dedicated vault and a read-only service account connected under Settings Secrets. The one-time-password field types the current code, and it is needed only when the portal logs the account out.
- Write the run and collect the files. A Python script starts a run with the profile and secret bindings limited to the portal's domain, waits for completion, lists the browsers the session used, then pages through each browser's downloads (50 files per page). Files can land after the run ends, so it polls until two checks agree, up to three minutes. Download links are valid for 15 minutes.
- Copy the files to your storage (S3, SharePoint or Drive), and keep the agent's reported invoice numbers next to the files so they can be compared.
- Schedule it yourself. The public V4 API has no schedule endpoint, so the trigger is a crontab line or a GitHub Actions workflow. The example runs daily at 06:17 UTC.
The full comparison, code and links to the Playwright, Selenium, UiPath, Power Automate and GitHub Actions documentation are in the original post. The facts about those tools were checked on October 26, 2026.