Search our documentation:
Fetch an array of all the tests in your account.
apiKey
{ "code": "SUCCESS", "data": [ { "_id": "5967e6fbbfebc5ba07c5b0e4", "startUrl": "https://ghostinspector.com", "suite": { "_id": "5967e6e7bfebc5ba07c5b0e3", "name": "API Samples" }, "organization": { "_id": "547fb82d92423992d52a4fea", "name": "Sample Organization" }, "dateCreated": "2017-07-13T21:32:43.549Z", "dateUpdated": "2017-07-13T21:33:37.548Z", "dateExecutionFinished": "2017-07-13T21:49:48.304Z", "dateExecutionStarted": "2017-07-13T21:49:38.805Z", "screenshotComparePassing": true, "screenshotCompareThreshold": 0.1, "screenshotCompareEnabled": null, "passing": true, "failOnJavaScriptError": null, "autoRetry": null, "finalDelay": 5000, "maxAjaxDelay": 10000, "maxWaitDelay": 15000, "globalStepDelay": 250, "httpHeaders": [], "testFrequencyAdvanced": [], "testFrequency": 0, "name": "Test #1" }, { "_id": "5967e75abfebc5ba07c5b0e7", "startUrl": "http://ghostinspector.com/docs/", "suite": { "_id": "5967e6e7bfebc5ba07c5b0e3", "name": "API Samples" }, "organization": { "_id": "547fb82d92423992d52a4fea", "name": "Sample Organization" }, "dateCreated": "2017-07-13T21:34:18.425Z", "dateUpdated": "2017-07-13T21:36:08.523Z", "dateExecutionFinished": "2017-07-13T21:49:53.568Z", "dateExecutionStarted": "2017-07-13T21:49:42.657Z", "screenshotComparePassing": true, "screenshotCompareThreshold": 0.1, "screenshotCompareEnabled": null, "passing": true, "failOnJavaScriptError": null, "autoRetry": null, "finalDelay": 5000, "maxAjaxDelay": 10000, "maxWaitDelay": 15000, "globalStepDelay": 250, "httpHeaders": [], "testFrequencyAdvanced": [], "testFrequency": 0, "name": "Test #2" } ] }
Fetch a single test
apiKey
testId
{ "code": "SUCCESS", "data": { "_id": "5967e75abfebc5ba07c5b0e7", "startUrl": "http://ghostinspector.com/docs/", "suite": { "_id": "5967e6e7bfebc5ba07c5b0e3", "name": "API Samples" }, "organization": { "_id": "547fb82d92423992d52a4fea", "name": "Sample Organization" }, "dateCreated": "2017-07-13T21:34:18.425Z", "dateUpdated": "2017-07-13T21:36:08.523Z", "dateExecutionFinished": "2017-07-13T21:49:53.568Z", "dateExecutionStarted": "2017-07-13T21:49:42.657Z", "screenshotComparePassing": true, "screenshotCompareThreshold": 0.1, "screenshotCompareEnabled": null, "passing": true, "filters": [], "steps": [ { "command": "assign", "target": ".header-search-input", "value": "frames", "variableName": "", "optional": false, "private": false, "sequence": 0 }, { "command": "click", "target": ".header-search-button", "value": "", "variableName": "", "optional": false, "private": false, "sequence": 1 }, { "command": "assertTextPresent", "target": ".content .search-input", "value": "frames", "variableName": "", "optional": false, "private": false, "sequence": 2 } ], "failOnJavaScriptError": null, "autoRetry": null, "finalDelay": 5000, "maxAjaxDelay": 10000, "maxWaitDelay": 15000, "globalStepDelay": 250, "httpHeaders": [], "testFrequencyAdvanced": [], "testFrequency": 0, "name": "Test #2" } }
Execute a single test in your account and return the result.
apiKey
testId
startUrl
browser
firefox
(default), firefox-<version>
specific version of Firefox, for example firefox-57
, chrome
(paid plans only), phantomjs
viewport
{width}x{height}
, for example 1024x768
.userAgent
region
us-east-1
(default), us-west-1
, ca-central-1
, eu-central-1
, eu-west-1
, eu-west-2
, eu-west-3
, eu-north-1
, me-south-1
, ap-east-1
, ap-northeast-1
, ap-northeast-2
, ap-southeast-1
, ap-southeast-2
, ap-south-1
, sa-east-1
httpAuthUsername
httpAuthPassword
webhook
disableNotifications
1
to disable all notifications for this execution onlyimmediate
1
to initiate the execution, then immediate return a response (without results)dataFile
slackChannel
myChannel
or %23myChannel
and not #myChannel
.[varName]
{{varName}}
. For example, including &firstName=Justin
in the API call will create a {{firstName}}
variable with the value Justin
.POST
variables will override GET
parameters.curl "https://api.ghostinspector.com/v1/tests/<testId>/execute/?apiKey=<key>&startUrl=<url>"
curl -d "apiKey=<key>" -d "startUrl=<url>" "https://api.ghostinspector.com/v1/tests/<testId>/execute/"
curl -H 'Content-Type: application/json' -d '{"apiKey": "<key>", "startUrl": "https://ghostinspector.com", "myVar": 99}' 'https://api.ghostinspector.com/v1/tests/<testId>/execute/'
curl -F "apiKey=<key>" -F "dataFile=@vars.csv" "https://api.ghostinspector.com/v1/tests/<testId>/execute/"
{ "code": "SUCCESS", "data": { "_id": "5967ee29d078e8ba058b2458", "uuid": "a5243051-f997-40a7-86ae-1e4069f10748", "test": { "_id": "5967e75abfebc5ba07c5b0e7", "suite": "5967e6e7bfebc5ba07c5b0e3", "organization": "547fb82d92423992d52a4fea", "name": "Test #2" }, "suiteResult": null, "name": "Test #2", "browser": "slimerjs-52", "globalStepDelay": 250, "maxWaitDelay": 15000, "maxAjaxDelay": 10000, "finalDelay": 5000, "autoRetry": true, "failOnJavaScriptError": false, "screenshotCompareEnabled": true, "screenshotCompareThreshold": 0.1, "startUrl": "http://ghostinspector.com/docs/", "region": "us-east-1", "dateExecutionStarted": "2017-07-13T22:03:23.374Z", "executionHost": "prod012.ghostinspector.net", "dateExecutionFinished": "2017-07-13T22:03:34.310Z", "endUrl": "https://ghostinspector.com/docs/?q=frames", "executionTime": 10936, "extractions": { "pageTitle": "Documentation - Ghost Inspector" }, "screenshot": { "small": { "path": "/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-small.png", "defaultUrl": "https://ghostinspector-prod.s3.amazonaws.com/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-small.png", "dims": { "w": 320, "h": 698 }, "size": 92213 }, "original": { "path": "/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-original.png", "defaultUrl": "https://ghostinspector-prod.s3.amazonaws.com/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-original.png", "dims": { "w": 1024, "h": 2232 }, "size": 237173 } }, "screenshotCompareBaselineResult": "5967ee09bfebc5ba07c5b0f0", "dateCreated": "2017-07-13T22:03:21.224Z", "video": { "path": "/videos/a5243051-f997-40a7-86ae-1e4069f10748.mp4", "url": "https://ghostinspector-prod.s3.amazonaws.com/videos/a5243051-f997-40a7-86ae-1e4069f10748.mp4", "dims": { "w": 1024, "h": 768 } }, "screenshotCompareDifference": 0.001, "screenshotComparePassing": true, "passing": true, "console": [ { "output": "Sample console error...", "error": false, "url": "https://ghostinspector.com/docs/?q=frames", "dateExecuted": "2017-07-13T22:03:27.288Z" } ], "urls": [ "http://ghostinspector.com/docs/", "https://ghostinspector.com/docs/?q=frames" ], "filters": [], "steps": [ { "command": "assign", "target": ".header-search-input", "value": "frames", "variableName": "", "url": "https://ghostinspector.com/docs/", "dateExecuted": "2017-07-13T22:03:26.503Z", "passing": true, "optional": false, "private": false, "sequence": 0 }, { "command": "click", "target": ".header-search-button", "value": "", "variableName": "", "url": "https://ghostinspector.com/docs/", "dateExecuted": "2017-07-13T22:03:26.982Z", "passing": true, "optional": false, "private": false, "sequence": 1 }, { "command": "assertTextPresent", "target": ".content .search-input", "value": "frames", "variableName": "", "url": "https://ghostinspector.com/docs/?q=frames", "dateExecuted": "2017-07-13T22:03:28.236Z", "passing": true, "optional": false, "private": false, "sequence": 2 }, { "command": "extract", "target": "title", "value": "", "variableName": "pageTitle", "url": "https://ghostinspector.com/docs/?q=frames", "extracted": "Documentation - Ghost Inspector", "dateExecuted": "2017-07-13T22:03:28.695Z", "passing": true, "optional": false, "private": false, "sequence": 3 } ], "viewportSize": { "height": 768, "width": 1024 }, "user": { "_id": "52df0d27fbaced54db000006", "name": "Sample User" } } }
Fetch a list of the currently-executing results for this test and return the result.
apiKey
testId
{ "code": "SUCCESS", "data": [ { "_id": "5c7ecd2a0d67ff21aac665e7", "viewportSize": { "width": 1024, "height": 768 }, "commentCount": 0, "passing": null, "screenshotCompareDifference": null, "screenshotComparePassing": null, "urls": [], "autoRetry": true, "browser": "chrome", "comments": [], "console": [], "dateCreated": "2019-03-05T19:25:30.553Z", "endUrl": "", "executionHost": "", "executionTime": null, "failOnJavaScriptError": false, "filters": [], "finalDelay": 0, "globalStepDelay": 250, "maxAjaxDelay": 10000, "maxWaitDelay": 15000, "name": "My test", "region": "us-east-1", "screenshotCompareBaselineResult": null, "screenshotCompareEnabled": false, "screenshotCompareThreshold": 0.1, "startUrl": "https://ghostinspector.com", "steps": [ { "sequence": 0, "private": false, "optional": false, "passing": null, "_id": "5bc8ffa2d75a137a2c056e32", "command": "assign", "target": "#username", "value": "xxx", "variableName": "", "notes": "" }, { "sequence": 1, "condition": null, "private": false, "optional": false, "passing": null, "_id": "5bcf6829d75a137a2c056f2f", "command": "assertText", "target": "#username", "value": "xxx", "variableName": "", "notes": "" }, { "sequence": 2, "private": false, "optional": false, "passing": null, "_id": "5bcf6829d75a137a2c056f2e", "command": "click", "target": "#submit", "value": "", "variableName": "", "notes": "" } ], "suiteResult": null, "test": { "_id": "5bcf677fd75a137a2c056f24", "name": "My test", "organization": "5a1b419ae40144279f9ac680", "suite": "5bc8ff45d75a137a2c056e2e" }, "user": { "_id": "5a1c2e15e40144279f9ac861", "name": "Aaron Fay" }, "uuid": "d53300d9-39e2-4249-b33a-d6a2745e9d86" } ] }
Accept the current screenshot as the new baseline for this test.
apiKey
testId
{ "code": "SUCCESS", "data": { "_id": "5967e75abfebc5ba07c5b0e7", "startUrl": "http://ghostinspector.com/docs/", "suite": { "_id": "5967e6e7bfebc5ba07c5b0e3", "name": "API Samples" }, "organization": { "_id": "547fb82d92423992d52a4fea", "name": "Sample Organization" }, "dateCreated": "2017-07-13T21:34:18.425Z", "dateUpdated": "2017-07-13T21:36:08.523Z", "dateExecutionFinished": "2017-07-13T21:49:53.568Z", "dateExecutionStarted": "2017-07-13T21:49:42.657Z", "screenshotComparePassing": true, "screenshotCompareThreshold": 0.1, "screenshotCompareEnabled": null, "passing": true, "filters": [], "steps": [ { "command": "assign", "target": ".header-search-input", "value": "frames", "variableName": "", "optional": false, "private": false, "sequence": 0 }, { "command": "click", "target": ".header-search-button", "value": "", "variableName": "", "optional": false, "private": false, "sequence": 1 }, { "command": "assertTextPresent", "target": ".content .search-input", "value": "frames", "variableName": "", "optional": false, "private": false, "sequence": 2 } ], "failOnJavaScriptError": null, "autoRetry": null, "finalDelay": 5000, "maxAjaxDelay": 10000, "maxWaitDelay": 15000, "globalStepDelay": 250, "httpHeaders": [], "testFrequencyAdvanced": [], "testFrequency": 0, "name": "Test #2" } }
Duplicate a test within your account, return the new test. The new test will be duplicated within the same Suite as the original.
apiKey
testId
{ "code": "SUCCESS", "data": { "user": "59fcf3db937eed176d5d28dc", "startUrl": "http://ghostinspector.com/docs/", "suite": { "_id": "59fcf3e9937eed176d5d28e0", "name": "API Samples" }, "organization": { "_id": "59fcf3dc937eed176d5d28dd", "name": "Sample Organization" }, "__v": 0, "_id": "59fcf45e13df81176e885d29", "dateCreated": "2017-11-03T22:57:34.733Z", "dateUpdated": "2017-11-03T22:57:34.733Z", "dateExecutionFinished": "1970-01-01T00:00:00.000Z", "dateExecutionStarted": "1970-01-01T00:00:00.000Z", "dateExecutionTriggered": "1970-01-01T00:00:00.000Z", "screenshotComparePassing": null, "screenshotCompareThreshold": 0.1, "screenshotCompareEnabled": null, "passing": null, "filters": [], "steps": [ { "command": "assign", "target": ".header-search-input", "value": "frames", "variableName": "", "optional": false, "private": false, "sequence": 0 }, { "command": "click", "target": ".header-search-button", "value": "", "variableName": "", "optional": false, "private": false, "sequence": 1 }, { "command": "assertTextPresent", "target": ".content .search-input", "value": "frames", "variableName": "", "optional": false, "private": false, "sequence": 2 } ], "failOnJavaScriptError": null, "autoRetry": null, "finalDelay": 5000, "maxAjaxDelay": 10000, "maxWaitDelay": 15000, "globalStepDelay": 250, "httpHeaders": [], "testFrequencyAdvanced": [], "testFrequency": 0, "name": "Test #2 (Copy)" } }
Fetch an array containing the results for a test. Results are returned in reverse chronological order (newest first).
apiKey
testId
count
offset
{ "code": "SUCCESS", "data": [ { "_id": "5967ee29d078e8ba058b2458", "uuid": "a5243051-f997-40a7-86ae-1e4069f10748", "test": { "_id": "5967e75abfebc5ba07c5b0e7", "suite": "5967e6e7bfebc5ba07c5b0e3", "organization": "547fb82d92423992d52a4fea", "name": "Test #2" }, "suiteResult": null, "name": "Test #2", "browser": "slimerjs-52", "globalStepDelay": 250, "maxWaitDelay": 15000, "maxAjaxDelay": 10000, "finalDelay": 5000, "autoRetry": true, "failOnJavaScriptError": false, "screenshotCompareEnabled": true, "screenshotCompareThreshold": 0.1, "startUrl": "http://ghostinspector.com/docs/", "region": "us-east-1", "dateCreated": "2017-07-13T22:03:21.224Z", "screenshotCompareDifference": 0.001, "screenshotComparePassing": true, "passing": true, "console": [ { "output": "Sample console error...", "error": false, "url": "https://ghostinspector.com/docs/?q=frames", "dateExecuted": "2017-07-13T22:03:27.288Z" } ], "urls": [ "http://ghostinspector.com/docs/", "https://ghostinspector.com/docs/?q=frames" ], "filters": [], "steps": [ { "command": "assign", "target": ".header-search-input", "value": "frames", "variableName": "", "url": "https://ghostinspector.com/docs/", "dateExecuted": "2017-07-13T22:03:26.503Z", "passing": true, "optional": false, "private": false, "sequence": 0 }, { "command": "click", "target": ".header-search-button", "value": "", "variableName": "", "url": "https://ghostinspector.com/docs/", "dateExecuted": "2017-07-13T22:03:26.982Z", "passing": true, "optional": false, "private": false, "sequence": 1 }, { "command": "assertTextPresent", "target": ".content .search-input", "value": "frames", "variableName": "", "url": "https://ghostinspector.com/docs/?q=frames", "dateExecuted": "2017-07-13T22:03:28.236Z", "passing": true, "optional": false, "private": false, "sequence": 2 }, { "command": "extract", "target": "title", "value": "", "variableName": "pageTitle", "url": "https://ghostinspector.com/docs/?q=frames", "extracted": "Documentation - Ghost Inspector", "dateExecuted": "2017-07-13T22:03:28.695Z", "passing": true, "optional": false, "private": false, "sequence": 3 } ], "viewportSize": { "height": 768, "width": 1024 }, "user": { "_id": "52df0d27fbaced54db000006", "name": "Sample User" }, "dateExecutionStarted": "2017-07-13T22:03:23.374Z", "executionHost": "prod012.ghostinspector.net", "dateExecutionFinished": "2017-07-13T22:03:34.310Z", "endUrl": "https://ghostinspector.com/docs/?q=frames", "executionTime": 10936, "extractions": { "pageTitle": "Documentation - Ghost Inspector" }, "screenshot": { "original": { "size": 237173, "dims": { "h": 2232, "w": 1024 }, "defaultUrl": "https://ghostinspector-prod.s3.amazonaws.com/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-original.png", "path": "/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-original.png" }, "small": { "size": 92213, "dims": { "h": 698, "w": 320 }, "defaultUrl": "https://ghostinspector-prod.s3.amazonaws.com/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-small.png", "path": "/screenshots/a5243051-f997-40a7-86ae-1e4069f10748-small.png" } }, "screenshotCompareBaselineResult": "5967ee09bfebc5ba07c5b0f0", "video": { "path": "/videos/a5243051-f997-40a7-86ae-1e4069f10748.mp4", "url": "https://ghostinspector-prod.s3.amazonaws.com/videos/a5243051-f997-40a7-86ae-1e4069f10748.mp4", "dims": { "w": 1024, "h": 768 } } }, { "_id": "5967ee09bfebc5ba07c5b0f0", "uuid": "8f779b4c-01c9-434f-b08c-86b99015e52f", "test": { "_id": "5967e75abfebc5ba07c5b0e7", "suite": "5967e6e7bfebc5ba07c5b0e3", "organization": "547fb82d92423992d52a4fea", "name": "Test #2" }, "suiteResult": null, "name": "Test #2", "browser": "slimerjs-52", "globalStepDelay": 250, "maxWaitDelay": 15000, "maxAjaxDelay": 10000, "finalDelay": 5000, "autoRetry": true, "failOnJavaScriptError": false, "screenshotCompareEnabled": true, "screenshotCompareThreshold": 0.1, "startUrl": "http://ghostinspector.com/docs/", "region": "us-east-1", "dateCreated": "2017-07-13T22:02:49.129Z", "screenshotCompareDifference": 0, "screenshotComparePassing": true, "passing": true, "console": [ { "output": "Sample console error...", "error": false, "url": "https://ghostinspector.com/docs/?q=frames", "dateExecuted": "2017-07-13T22:02:57.289Z" } ], "urls": [ "http://ghostinspector.com/docs/", "https://ghostinspector.com/docs/?q=frames" ], "filters": [], "steps": [ { "command": "assign", "target": ".header-search-input", "value": "frames", "variableName": "", "url": "https://ghostinspector.com/docs/", "dateExecuted": "2017-07-13T22:02:56.237Z", "passing": true, "optional": false, "private": false, "sequence": 0 }, { "command": "click", "target": ".header-search-button", "value": "", "variableName": "", "url": "https://ghostinspector.com/docs/", "dateExecuted": "2017-07-13T22:02:56.764Z", "passing": true, "optional": false, "private": false, "sequence": 1 }, { "command": "assertTextPresent", "target": ".content .search-input", "value": "frames", "variableName": "", "url": "https://ghostinspector.com/docs/?q=frames", "dateExecuted": "2017-07-13T22:02:58.034Z", "passing": true, "optional": false, "private": false, "sequence": 2 }, { "command": "extract", "target": "title", "value": "", "variableName": "pageTitle", "url": "https://ghostinspector.com/docs/?q=frames", "extracted": "Documentation - Ghost Inspector", "dateExecuted": "2017-07-13T22:02:58.470Z", "passing": true, "optional": false, "private": false, "sequence": 3 } ], "viewportSize": { "height": 768, "width": 1024 }, "user": { "_id": "52df0d27fbaced54db000006", "name": "Sample User" }, "dateExecutionStarted": "2017-07-13T22:02:52.850Z", "executionHost": "prod012.ghostinspector.net", "dateExecutionFinished": "2017-07-13T22:03:04.112Z", "endUrl": "https://ghostinspector.com/docs/?q=frames", "executionTime": 11262, "extractions": { "pageTitle": "Documentation - Ghost Inspector" }, "screenshot": { "original": { "size": 237083, "dims": { "h": 2232, "w": 1024 }, "defaultUrl": "https://ghostinspector-prod.s3.amazonaws.com/screenshots/8f779b4c-01c9-434f-b08c-86b99015e52f-original.png", "path": "/screenshots/8f779b4c-01c9-434f-b08c-86b99015e52f-original.png" }, "small": { "size": 92210, "dims": { "h": 698, "w": 320 }, "defaultUrl": "https://ghostinspector-prod.s3.amazonaws.com/screenshots/8f779b4c-01c9-434f-b08c-86b99015e52f-small.png", "path": "/screenshots/8f779b4c-01c9-434f-b08c-86b99015e52f-small.png" } }, "video": { "path": "/videos/8f779b4c-01c9-434f-b08c-86b99015e52f.mp4", "url": "https://ghostinspector-prod.s3.amazonaws.com/videos/8f779b4c-01c9-434f-b08c-86b99015e52f.mp4", "dims": { "w": 1024, "h": 768 } } } ] }
Download a single test in Ghost Inspector format (.json).
apiKey
testId
{ "autoRetry": null, "browser": null, "failOnJavaScriptError": null, "filters": [], "finalDelay": 0, "globalStepDelay": null, "httpHeaders": [], "links": [], "maxAjaxDelay": null, "maxWaitDelay": null, "name": "Imports", "notifications": {}, "publicStatusEnabled": false, "region": null, "screenshotCompareEnabled": null, "screenshotCompareThreshold": 0.1, "startUrl": "https://ghostinspector.com/", "steps": [ { "condition": null, "optional": false, "private": false, "sequence": 0, "command": "execute", "target": "", "value": "5a1b535be40155279f9ac709", "variableName": "" }, { "condition": null, "optional": false, "private": false, "sequence": 1, "command": "assertEval", "target": "", "value": "return true", "variableName": "" } ], "testFrequency": 0, "testFrequencyAdvanced": [], "viewportSize": null }
Download a single test in Selenium IDE format (.side).
apiKey
testId
{ "id": "2c181a11-c461-4bf3-8df2-7189434804a1", "version": "1.1", "name": "Sample Test", "url": "http://sampledomain.com/", "tests": [ { "id": "9e7ea88a-8780-488a-9880-0396d8e341a2", "name": "Sample Test", "commands": [ { "command": "open", "target": "http://sampledomain.com/", "value": "" }, { "command": "setWindowSize", "target": "1024x768", "value": "" }, { "comment": "", "command": "type", "target": "xpath=//input[@id=\"username\"]", "value": "sample" } ] } ], "suites": [ { "id": "c7a3f198-7793-4231-817e-05427eca6be9", "name": "Sample Test", "persistSession": false, "parallel": true, "timeout": 600, "tests": [ "9e7ea88a-8780-488a-9880-0396d8e341a2" ] } ], "plugins": [] }
Download a single test in Selenium IDE format (.html).
apiKey
testId
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head profile="http://selenium-ide.openqa.org/profiles/test-case"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="selenium.base" href="https://ghostinspector.com" /> <title>Sample Test</title> </head> <body> <table cellpadding="1" cellspacing="1" border="1"> <thead> <tr> <td rowspan="1" colspan="3">Sample Test</td> </tr> </thead> <tbody> <tr> <td>open</td> <td>/</td> <td></td> </tr> <tr> <td>waitForPageToLoad</td> <td></td> <td></td> </tr> <tr> <td>waitForElementPresent</td> <td>css=#username</td> <td></td> </tr> <tr> <td>type</td> <td>css=#username</td> <td>test</td> </tr> <tr> <td>waitForPageToLoad</td> <td></td> <td></td> </tr> <tr> <td>waitForElementPresent</td> <td>css=#submit</td> <td></td> </tr> <tr> <td>click</td> <td>css=#submit</td> <td></td> </tr> </tbody> </table> </body> </html>
Real-time embeddable status badges for your test. Will return the appropriate status badge image based on the current status of your test.
screenshot
screenshotComparePassing
for this test.<img src="https://api.ghostinspector.com/v1/tests/<testId>/status-badge" title="My test status">
Execute an on-demand test using JSON from your file system or repository. This endpoint will trigger a test run created out of the JSON definition provided and immediately return a result ID. On-demand test results are associated with your organization, but are not tied to existing tests or suites within the system. Results must be retrieved using the result ID in the response and the Get Test Result endpoint.
organizationId
apiKey
curl -H 'Content-Type: application/json' -X POST -d "@test.json" 'https://api.ghostinspector.com/v1/organizations/<my-org-id>/on-demand/execute/'
{ "code": "SUCCESS", "data": { "_id": "5dbc760c185e8911cfd6f2a0", "user": { "name": "Ghost User", "_id": "59f35ea3ae726358914cc184" }, "viewportSize": { "width": 1024, "height": 768 }, "commentCount": 0, "disableVisuals": false, "passing": null, "screenshotCompareDifference": null, "screenshotComparePassing": null, "urls": [], "autoRetry": true, "browser": "chrome", "comments": [], "console": [], "dateCreated": "2019-11-01T18:14:36.203Z", "endUrl": "", "executionHost": "test-runner-916cf2.ghostinspector.net", "executionTime": null, "failOnJavaScriptError": false, "filters": [], "finalDelay": 5000, "globalStepDelay": 250, "maxAjaxDelay": 10000, "maxWaitDelay": 15000, "name": "Assertions", "organization": "5a0604918ee170435385d4a7", "region": "us-east-1", "screenshotCompareBaselineResult": null, "screenshotCompareEnabled": true, "screenshotCompareThreshold": 0.1, "screenshotExclusions": "", "screenshotTarget": "", "startUrl": "https://www.onlineconstructioninc.com/", "steps": [ { "sequence": 0, "condition": null, "private": false, "optional": false, "passing": null, "_id": "5dbc760c185e8911cfd6f2c2", "command": "assign", "target": "#username", "value": "Decimal", "variableName": "", "notes": "Assign a \"Special\" string to make sure if doesn't get converted to the character" }, { "sequence": 1, "condition": null, "private": false, "optional": false, "passing": null, "_id": "5dbc760c185e8911cfd6f2c1", "command": "assertText", "target": "#username", "value": "Decimal", "variableName": "" }, { "sequence": 2, "condition": null, "private": false, "optional": false, "passing": null, "_id": "5dbc760c185e8911cfd6f2c0", "command": "assign", "target": "#username", "value": "Escape", "variableName": "", "notes": "Assign a \"Special\" string to make sure if doesn't get converted to the character" } ], "suiteResult": null, "test": null, "userAgent": "", "uuid": "513e2f78-ad93-4158-a15e-a4f9e50e6322", "dateExecutionStarted": "2019-11-01T18:14:36.287Z" } }