Playwright enables you to write end-to-end tests and can test anything that runs on a browser.
- Currently imageVersion property will run a browser version which is not compatible with the requested image version.
- The video file attached to the test report can't be download.
These should be fixed in the next release (22.8)
Playwright support is available only in SaaS clouds.
In order to run Playwright projects in Cloud, you need to have a Docker Swarm and Execution Service set up in your environment.
Playwright projects are run inside containers in Docker Swarm via Execution Service API.
In order to run Playwright project Cloud need to have Browser license.
Execution Service API
The role of the user performing the Rest Operation is specified by the Authorization header.
For more information please visit How To Execute Rest API, for a detailed example.
Start a Playwright execution
Enables users to run Playwright projects.
Playwright projects are run asynchronously, the response received is immediate.
Specify execution type. for Playwright use Playwright
The Playwright project to run.
A configuration file for the requested execution.
Playwright project can contain a config file named playwright.config.js which must be located under the root folder.
In order to have a video in the report add the following property to the config file: video: 'on' under the 'use' section.
In order to run Playwright project, a configuration must be supplied.
There are 2 options to add configuration:
- add the conf parameter as a JSON string to the POST request.
- a file named digitalai.json with the required configuration in the root directory of the project
When supplying both options, the digitalai.json is ignored
A list of browser names and playwright versions to run the project on. each entry in the list is as follows:
Supported browsers are Chromium, Firefox and Webkit.
Get Playwright execution status
Get the Playwright execution status
Get status privileges:
- User can get only his own session status
- Project admin can get his own session status and can get statuses from other users of his project
- Admin can get any session status on his cloud
Cancel Playwright execution
Cancel Playwright execution project by test run id.
- User can cancel only his own execution
- Project admin can cancel his own execution and can cancel executions from other users of his project
- Admin can cancel any execution on his cloud