Web Browser Automation for Operations and Agency Teams: What to Automate and Which Tool to Use
By Greg Nowak. Updated 5 August 2026.
Browser automation earns its keep when people repeatedly log into web portals, follow predictable steps, and produce files, screenshots, checks, or records. Think supplier-report downloads, campaign launch checks, order reconciliation, form testing, and evidence gathering from authenticated systems.
The browser can usually be automated. The harder question is whether the result will become a dependable business workflow or a brittle script that silently fails after a page redesign. That depends less on clever code than on choosing the right process, tool, and operating safeguards.
Automate the process only after you understand it
Write the current workflow in plain language before selecting a framework. Record what triggers it, which account it uses, the decisions a person makes, what “complete” means, and who handles exceptions. Run through uncommon cases too: missing reports, expired sessions, duplicate records, unexpected pop-ups, and partial downloads.
Next, ask whether the vendor provides an API, webhook, scheduled export, managed integration, or direct database connection. Those routes are generally more stable because they do not depend on a visual interface intended for people. Browser automation makes sense when no suitable backend route exists, the work is frequent and sufficiently consistent, and its value exceeds the likely maintenance cost.
A good first project is narrow: one portal, one output, and one clear reviewer. Automating an entire cross-company process before learning where it varies usually creates a larger problem, not a better system.
Which browser automation tool should you choose?
For many new JavaScript or TypeScript projects, Playwright is the strongest starting point. It supports Chromium, Firefox, and WebKit, provides browser installation tooling, and includes reports and traces. Its locators automatically wait for elements to become actionable, while its web-first assertions retry until an expected condition is met. Those features remove many arbitrary delays, although they cannot compensate for an ambiguous process.
Selenium remains a sensible choice for organisations with an established WebDriver test estate, existing language expertise, Selenium Grid infrastructure, or compatibility requirements. Driver setup is less awkward than it once was: Selenium Manager ships with Selenium and can discover, download, and cache a suitable driver when one has not been supplied. Its documentation still labels the component beta, so teams should test updates in their own runtime rather than treating driver management as invisible.
The R choice deserves more caution. RSelenium can fit an existing remote WebDriver workflow, but its current project documentation still describes bindings for Selenium 2.0 and contains visibly old examples. That does not make the package unusable; it does make it a choice to validate carefully rather than the automatic foundation for a new system.
For Chromium-focused work inside R, chromote is often the cleaner starting point. It implements the Chrome DevTools Protocol, supports synchronous and asynchronous use, and provides convenient methods for navigation and screenshots. It can also install specific Chrome for Testing versions, which helps make scheduled runs more reproducible.
| Situation | Start with | Decision reason |
|---|---|---|
| New portal workflow, launch check, or end-to-end test | Playwright | Modern waiting, locator, tracing, and multi-browser tooling. |
| Existing WebDriver suite, Grid, or enterprise QA stack | Selenium | Fits established infrastructure and language expertise. |
| Existing R process already uses remote WebDriver | RSelenium | May minimise change, but validate its fit and maintenance requirements. |
| R workflow needs Chromium, screenshots, or live DOM access | chromote | Direct Chrome DevTools integration with a lighter R interface. |
| Vendor provides a suitable API or scheduled export | Use that instead | Usually more stable than controlling the visible interface. |
Build an operated workflow, not an unattended script
A production automation needs ownership and evidence. Use a dedicated integration or service account where the vendor permits one. Keep credentials and session files out of source code, restrict their access, and define how they are rotated. Do not bypass CAPTCHA, multi-factor authentication, rate limits, access controls, or vendor terms. Sensitive actions may require an approved account or a human confirmation step.
Prefer accessible names, roles, stable test IDs, and other explicit contracts over long CSS or XPath expressions copied from developer tools. Check meaningful outcomes after each important action: the expected account is open, the date range is correct, the confirmation appeared, or the downloaded file exists and contains plausible data.
Every run should end in an explicit state such as completed, needs review, or failed. Log major steps without exposing secrets or personal data. On failure, preserve useful evidence such as a screenshot, trace, page URL, timestamp, and concise error. Add alerts only when someone is responsible for responding to them.
Useful starting commands
These commands reflect the current official installation guidance:
# Create a Playwright Test project (JavaScript or TypeScript)
npm init playwright@latest
npx playwright test
# Install browser binaries and system dependencies in a CI environment
npx playwright install --with-deps
# Install the released R packages from CRAN
install.packages("RSelenium")
vignette("basics", package = "RSelenium")
install.packages("chromote")Scaffolding is only the beginning. Before scheduling a run, test it with realistic accounts and data, force several failure cases, and document how another person can pause, rerun, or repair it. Pin and update dependencies deliberately rather than allowing a business-critical workflow to change without review.
Define success in business terms
For an agency, success may be a client-readable package of timestamped screenshots, validation results, and exceptions. For an operations team, it may be a correctly named file in an existing folder, a reconciled spreadsheet, or a review ticket with enough context to act.
Measure the manual time removed, but also track failed runs, interventions, and maintenance effort. A workflow that saves minutes yet demands frequent developer attention is not mature automation.
When outside help is useful
Outside support is worth considering when the process crosses systems, depends on authenticated sessions, handles client or customer data, or must run reliably without a developer watching it. The useful work includes process design, exception handling, security, deployment, and handover—not merely scripting clicks.
If you have a repetitive browser workflow, Greg can help assess whether it should use an API, Playwright, Selenium, or an R-based approach, then shape a first version your team can understand and operate. Get in touch to discuss the workflow before it grows into another fragile internal dependency.
Related on GrN.dk
- AI automations need a spend dashboard before the first runaway bill
- AI agents need a browser policy before they start clicking around
- NGINX 1.30 changed upstream connection reuse: what to check before you upgrade
Need help with this kind of work?
Discuss a browser automation workflow Get in touch with Greg.
Sources
- Log in to post comments