Record video
This example fills in all the fields on the Watson and Holmes Intake Form, while capturing a video record.
The test spec is hosted online as a Markdown file, so you don’t need to download it. You pass its URL to Doc Detective with the --input argument, and Doc Detective fetches and runs it.
To run the test:
-
Set up your test environment so the sample form is served at
http://localhost:8080/watson_and_holmes_intake_form.html. -
Run the hosted form-filler3.md test spec with Doc Detective:
NPX
Docker
To record, you must run the test with headless mode turned off. The display window of the browser constrains the view area of the screenshot and video functions.
Code walkthrough
These are the notable additions to the spec used in the Capture screenshot tutorial.
For this example, the headless setting must be false, so that the test actions are visible in the browser.
Start the recording with the record action and an optional output path.
After the actions are complete, stop the recording with the stopRecord action.
Complete test spec
View the complete spec at form-filler3.md.