Selenium Browser Automation Runner avatar

Selenium Browser Automation Runner

Pricing

from $3.00 / 1,000 results

Go to Apify Store
Selenium Browser Automation Runner

Selenium Browser Automation Runner

Run declarative browser automation workflows with Selenium WebDriver, including navigation, clicks, form input, extraction, assertions, waits, and screenshots.

Pricing

from $3.00 / 1,000 results

Rating

0.0

(0)

Developer

ProdukDigitalAli

ProdukDigitalAli

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Share

Run repeatable browser automation workflows in the cloud with Selenium WebDriver + Chrome.

This Actor is designed for developers, QA engineers, automation teams, data workflows, and AI/agent pipelines that need browser interactions without maintaining their own Selenium infrastructure.

What it can do

Build a workflow from ordered JSON actions such as:

  • navigate to another public URL
  • wait for an element
  • click elements
  • type into inputs
  • clear inputs
  • select dropdown options
  • extract visible text
  • extract element attributes
  • read the page title and current URL
  • assert that page text, title, or URL contains an expected value
  • capture screenshots
  • pause between actions

Each executed action produces one structured result in the default Apify dataset. Screenshot actions also save PNG files to the default key-value store.

Supported selector strategies

Selenium supports several locator strategies. Set selectorType to one of:

selectorTypeSelenium locator
cssCSS selector
xpathXPath
idElement ID
namename attribute
classNameClass name
tagNameHTML tag name
linkTextExact link text
partialLinkTextPartial link text

If selectorType is omitted, css is used.

Quick start

The prefilled input opens https://example.com, reads the page title, waits for the main heading, extracts it, and captures a screenshot.

Example:

{
"startUrl": "https://example.com",
"stopOnError": true,
"actions": [
{
"type": "getTitle",
"label": "Read page title"
},
{
"type": "waitForSelector",
"label": "Wait for heading",
"selectorType": "css",
"selector": "h1",
"state": "visible"
},
{
"type": "extractText",
"label": "Read heading text",
"selectorType": "css",
"selector": "h1"
},
{
"type": "screenshot",
"label": "Capture page"
}
]
}

Action reference

goto

Navigate to another public HTTP/HTTPS URL.

{
"type": "goto",
"url": "https://example.com/docs",
"label": "Open docs"
}

waitForSelector

Wait until an element reaches a requested state.

Supported states: present, visible, clickable, hidden.

{
"type": "waitForSelector",
"selectorType": "css",
"selector": "button[type='submit']",
"state": "clickable"
}

click

Wait for an element to become clickable, then click it.

{
"type": "click",
"selectorType": "xpath",
"selector": "//button[contains(., 'Submit')]"
}

type

Type text into a visible element. Set clearFirst to true when you want to clear the field before typing.

{
"type": "type",
"selectorType": "name",
"selector": "email",
"text": "demo@example.com",
"clearFirst": true
}

clear

Clear an input element.

{
"type": "clear",
"selectorType": "id",
"selector": "search"
}

select

Select an HTML <select> option. selectBy can be value, text, or index.

{
"type": "select",
"selector": "select[name='country']",
"selectBy": "value",
"value": "ID"
}

extractText

Return visible element text.

{
"type": "extractText",
"selectorType": "css",
"selector": "h1"
}

extractAttribute

Return an element attribute/property value as exposed by Selenium.

{
"type": "extractAttribute",
"selectorType": "css",
"selector": "a.download",
"attribute": "href"
}

getTitle

Return the current page title.

{ "type": "getTitle" }

getUrl

Return the current browser URL.

{ "type": "getUrl" }

textContains

Wait until an element (or the page body when no selector is supplied) contains expected text.

{
"type": "textContains",
"selector": "#message",
"text": "Received!"
}

titleContains

Wait until the document title contains expected text.

{
"type": "titleContains",
"text": "Dashboard"
}

urlContains

Wait until the browser URL contains expected text.

{
"type": "urlContains",
"text": "submitted-form"
}

screenshot

Capture the current browser viewport as PNG. The dataset item contains the artifact URL.

{
"type": "screenshot",
"label": "After submit"
}

wait

Pause the workflow. Maximum: 300000 ms (5 minutes).

{
"type": "wait",
"milliseconds": 1000
}

Per-action timeout

The Actor uses actionTimeoutSeconds as the default timeout for waits and assertions. Any selector-based action can override it:

{
"type": "waitForSelector",
"selector": ".slow-widget",
"timeoutSeconds": 45
}

Output

Each action writes one item to the default dataset:

{
"passed": true,
"step": 3,
"label": "Read heading text",
"action": "extractText",
"selectorType": "css",
"selector": "h1",
"currentUrl": "https://example.com/",
"value": "Example Domain",
"error": null,
"artifactUrl": null,
"artifactType": null
}

Failed actions are also saved with passed: false and an error message. If stopOnError is enabled, execution ends after the failed step; otherwise the workflow continues.

Example: form automation

{
"startUrl": "https://www.selenium.dev/selenium/web/web-form.html",
"stopOnError": true,
"actions": [
{
"type": "waitForSelector",
"selectorType": "name",
"selector": "my-text",
"state": "visible"
},
{
"type": "type",
"selectorType": "name",
"selector": "my-text",
"text": "ProdukDigitalAli"
},
{
"type": "select",
"selectorType": "name",
"selector": "my-select",
"selectBy": "value",
"value": "2"
},
{
"type": "click",
"selectorType": "css",
"selector": "button"
},
{
"type": "waitForSelector",
"selectorType": "id",
"selector": "message",
"state": "visible"
},
{
"type": "extractText",
"selectorType": "id",
"selector": "message"
},
{
"type": "urlContains",
"text": "submitted-form"
},
{
"type": "textContains",
"selectorType": "id",
"selector": "message",
"text": "Received!"
},
{
"type": "screenshot",
"label": "Submitted form"
}
]
}

Safety and limits

  • Only public http:// and https:// URLs can be supplied as startUrl or goto destinations.
  • Localhost, private, loopback, link-local, reserved, multicast, and unspecified IP targets are rejected.
  • A maximum of 100 actions is accepted per run.
  • A single wait action is limited to five minutes.
  • Websites can change their DOM at any time; use stable selectors and reasonable waits.
  • Automated access may be restricted by a website's terms, authentication requirements, bot protection, or applicable law. Use the Actor only where you are authorized to automate access.

Selenium vs. the other browser runners

This Actor is intentionally Selenium/WebDriver-focused. It is useful when your existing test or automation knowledge is based on Selenium locator strategies and WebDriver-style interactions.

  • Cypress Website Test Runner: QA/smoke testing and assertions using Cypress.
  • Puppeteer Browser Automation Runner: high-level browser workflows using Puppeteer.
  • Chrome DevTools Automation Runner: low-level Chrome DevTools Protocol operations.
  • Selenium Browser Automation Runner: WebDriver workflows and Selenium locator strategies.

Running through the API

After publishing, the Actor can be started from Apify Console, schedules, integrations, or the Apify API. Results are available from the default dataset, while screenshots are stored in the default key-value store.

Notes

Selenium and Chrome run inside the Actor container. For the best reliability, prefer deterministic selectors, explicit waits, and small workflows that perform one clear automation job.