step
A step in a test.
Referenced In
Fields
| Field | Type | Description | Default |
|---|---|---|---|
| $schema | unknown | Optional. No description provided. | — |
| result | unknown | Optional. No description provided. | — |
| resultDescription | unknown | Optional. No description provided. | — |
| resultCode | unknown | Optional. No description provided. | — |
| resultHint | unknown | Optional. No description provided. | — |
| stepId | unknown | Optional. No description provided. | — |
| description | unknown | Optional. No description provided. | — |
| unsafe | unknown | Optional. No description provided. | — |
| outputs | unknown | Optional. No description provided. | — |
| variables | unknown | Optional. No description provided. | — |
| if | unknown | Optional. No description provided. | — |
| assertions | unknown | Optional. No description provided. | — |
| onPass | unknown | Optional. No description provided. | — |
| onFail | unknown | Optional. No description provided. | — |
| onWarning | unknown | Optional. No description provided. | — |
| onSkip | unknown | Optional. No description provided. | — |
| location | unknown | Optional. No description provided. | — |
| autoScreenshotPath | unknown | Optional. No description provided. | — |
| attempts | unknown | Optional. No description provided. | — |
| visit | unknown | Optional. No description provided. | — |
| durationMs | unknown | Optional. No description provided. | — |
| startedAt | unknown | Optional. No description provided. | — |
| checkLink | unknown | Optional. No description provided. | — |
| click | unknown | Optional. No description provided. | — |
| find | unknown | Optional. No description provided. | — |
| goTo | unknown | Optional. No description provided. | — |
| httpRequest | unknown | Optional. No description provided. | — |
| runShell | unknown | Optional. No description provided. | — |
| runCode | unknown | Optional. No description provided. | — |
| runBrowserScript | unknown | Optional. No description provided. | — |
| type | unknown | Optional. No description provided. | — |
| screenshot | unknown | Optional. No description provided. | — |
| saveCookie | unknown | Optional. No description provided. | — |
| record | unknown | Optional. No description provided. | — |
| stopRecord | unknown | Optional. No description provided. | — |
| closeSurface | unknown | Optional. No description provided. | — |
| startSurface | unknown | Optional. No description provided. | — |
| loadVariables | unknown | Optional. No description provided. | — |
| dragAndDrop | unknown | Optional. No description provided. | — |
| loadCookie | unknown | Optional. No description provided. | — |
| swipe | unknown | Optional. No description provided. | — |
| wait | unknown | Optional. No description provided. | — |
| annotate | unknown | Optional. No description provided. | — |
Examples
{"stepId": "uuid","description": "Description of the step.","checkLink": "https://www.google.com","variables": {"variableKey": "variableValue"}}
{"checkLink": "https://www.google.com"}
{"stepId": "path-only","checkLink": "/search"}
{"stepId": "status-code","checkLink": {"url": "https://www.google.com","statusCodes": [200]}}
{"goTo": {"url": "https://www.google.com"}}
{"goTo": "https://www.google.com"}
{"wait": 5000}
{"swipe": "up"}
{"swipe": {"from": {"x": 200,"y": 600},"to": {"x": 200,"y": 200}}}
{"runCode": {"language": "python","code": "print('Hello from Python')","workingDirectory": ".","exitCodes": [0],"stdio": "Hello from Python!","path": "python-output.txt","directory": "output","maxVariation": 0.1,"overwrite": "aboveVariation"}}
{"stopRecord": true}
{"runShell": {"command": "docker run -p 8080:80 nginx","background": {"name": "web","waitUntil": {"httpGet": "http://localhost:8080"}},"timeout": 30000}}
{"closeSurface": "web"}
{"screenshot": true}
{"screenshot": "image.png"}
{"screenshot": "static/images/image.png"}
{"screenshot": "/User/manny/projects/doc-detective/static/images/image.png"}
{"screenshot": {"path": "image.png","directory": "static/images","maxVariation": 0.1,"overwrite": "aboveVariation","crop": "#elementToScreenshot"}}
{"screenshot": {"path": "image.png","directory": "static/images","maxVariation": 0.1,"overwrite": "aboveVariation"}}
{"screenshot": {"path": "image.png","directory": "static/images","maxVariation": 0.1,"overwrite": "aboveVariation","crop": {"selector": "#elementToScreenshot","elementText": "Element text","padding": {"top": 0,"right": 0,"bottom": 0,"left": 0}}}}
{"record": true}
{"record": "video.mp4"}
{"record": "static/media/video.mp4"}
{"record": "/User/manny/projects/doc-detective/static/media/video.mp4"}
{"record": {"path": "video.mp4","directory": "static/media","overwrite": true}}
{"loadVariables": "variables.env"}
{"saveCookie": "session_token"}
{"saveCookie": {"name": "auth_cookie","path": "auth-session.txt","directory": "./test-data","overwrite": true}}
{"loadCookie": "session_token"}
{"loadCookie": {"name": "auth_cookie","path": "auth-session.txt","directory": "./test-data"}}
{"find": "Find me!"}
{"find": {"selector": "[title=Search]"}}
{"find": {"selector": "[title=Search]","timeout": 10000,"elementText": "Search","moveTo": true,"click": true,"type": "shorthair cat"}}
{"find": {"selector": "[title=Search]","click": {"button": "right"}}}
{"find": {"selector": "[title=Search]","timeout": 10000,"elementText": "Search","moveTo": true,"click": true,"type": {"keys": ["shorthair cat"],"inputDelay": 100}}}
{"click": "Submit"}
{"click": {"button": "left","elementText": "Element text"}}
{"click": {"selector": "#elementToScreenshot","elementText": "Element text","button": "middle"}}
{"httpRequest": "https://reqres.in/api/users"}
{"httpRequest": "$API_URL/users"}
{"httpRequest": {"url": "https://reqres.in/api/users"}}
{"httpRequest": {"url": "/api/users","statusCodes": 200,"request": {"headers": "Accept: application/json\nAuthorization: Bearer $TOKEN"}}}
{"httpRequest": {"url": "https://reqres.in/api/users/2","method": "put","request": {"body": {"name": "morpheus","job": "zion resident"}}}}
{"httpRequest": {"url": "https://reqres.in/api/users","method": "post","request": {"body": {"name": "morpheus","job": "leader"}},"response": {"body": {"name": "morpheus","job": "leader"}},"statusCodes": [200,201]}}
{"httpRequest": {"url": "https://www.api-server.com","method": "post","timeout": 30000,"request": {"body": {"field": "value"},"headers": {"header": "value"},"parameters": {"param": "value"}},"response": {"body": {"field": "value"},"headers": {"header": "value"}},"statusCodes": [200]}}
{"httpRequest": {"url": "https://reqres.in/api/users","method": "post","request": {"body": {"name": "morpheus","job": "leader"}},"response": {"body": {"name": "morpheus","job": "leader"}},"statusCodes": [200,201],"path": "response.json","directory": "media","maxVariation": 0.05,"overwrite": "aboveVariation"}}
{"httpRequest": {"openApi": "getUserById"}}
{"httpRequest": {"openApi": {"name": "Reqres","operationId": "getUserById"},"request": {"parameters": {"id": 123}}}}
{"httpRequest": {"openApi": {"descriptionPath": "https://api.example.com/openapi.json","operationId": "getUserById"},"request": {"parameters": {"id": 123}}}}
{"httpRequest": {"openApi": {"descriptionPath": "https://api.example.com/openapi.json","operationId": "createUser","useExample": "both"}}}
{"dragAndDrop": {"source": {"selector": "#sourceElement"},"target": {"selector": "#targetElement"}}}
{"runBrowserScript": "return document.title;"}
{"runBrowserScript": {"script": "return arguments[0] + arguments[1];","args": ["foo","bar"],"output": "foobar"}}
{"annotate": {"add": [{"id": "step-1","badge": "#username","label": "1"}]}}
{"annotate": {"clear": true}}