Skip to content

feat: add RobotActions as a device provider - #264

Open
krishtoautomate wants to merge 1 commit into
empirical-run:mainfrom
RobotActions:feat/robotactions-provider-upstream
Open

krishtoautomate wants to merge 1 commit into
empirical-run:mainfrom
RobotActions:feat/robotactions-provider-upstream

Conversation

@krishtoautomate

Copy link
Copy Markdown

Summary

Adds RobotActions as a device provider (provider: "robotactions"), alongside BrowserStack and LambdaTest.

A RobotActions grid is a W3C WebDriver endpoint behind an auth proxy, so the provider is a session factory plus the two dashboard hooks appwright expects:

  • syncTestDetails → POST /api/sessions/:id/result (test name, pass/fail, failure reason)
  • static downloadVideo → GET /api/sessions/:id/videos, streamed into the Playwright report; never throws, skipped when unavailable

Design notes:

  • Auth is a Bearer header on every request rather than user/key on the URL — the proxy gates DELETE /session/:id as well as POST /session, and the webdriver client only sends Basic credentials on createSession.
  • buildPath must be an http(s):// URL: the grid's Appium nodes download the build themselves and cannot see a file on the test runner.
  • udid, osVersion, orientation, testSuite and extra Appium capabilities are optional.

Config: ROBOTACTIONS_GRID_URL + ROBOTACTIONS_TOKEN. Docs added to README.md and docs/config.md; changeset included.

Test plan

  • npm run build, npm run lint, vitest (7 new unit tests for config/capabilities/video handling)
  • End to end against a grid: Wikipedia sample passes on a Pixel 4 XL; a deliberate failure reports as failed with its reason on the dashboard; session video attaches to the Playwright report

Unrelated, but worth knowing: @playwright/test 1.60+ rejects use.device for every provider (config validation change). This PR doesn't touch the pin; happy to open a separate one.

Runs tests on real devices attached to a RobotActions grid. The grid is
a W3C WebDriver endpoint behind an auth proxy, so the provider is a
session factory plus the two dashboard hooks appwright expects:

- syncTestDetails -> POST /api/sessions/:id/result (name, pass/fail,
  failure reason)
- static downloadVideo -> GET /api/sessions/:id/videos, streamed to the
  report from the grid URL (ROBOTACTIONS_API_URL overrides); never throws

Auth is a Bearer header on every request rather than user/key: the
proxy gates DELETE /session as well as POST /session, and the webdriver
client only sends Basic credentials on createSession.

buildPath must be an http(s) URL - the grid's Appium nodes download the
build themselves and cannot see a file on the test runner.

Verified end to end against a grid: Wikipedia sample passes on a Pixel
4 XL, a deliberate failure reports failed with its reason, video
attaches to the Playwright report.
@changeset-bot

changeset-bot Bot commented Sep 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c9b9504

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
appwright Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant