Skip to content

Detectors

JS Assertion Detector

if: js_assertion

Use this to execute a JavaScript command and assert it returns true.

Example

detect:
  - if: js_assertion
    command: 'return window.isAuthenticated === false;'

Properties

  • command: JavaScript command to execute

Page Selector Detector

if: page_selector

Use this to assert that a selector exists in the DOM.

Example

detect:
  - if: page_selector
    contains: '#my-element'

Properties

  • contains: Contains this string

Page Text Detector

if: page_text

Use this to assert that a text is present in the page.

Example

detect:
  - if: page_text
    contains: 'Hello, world!'

Properties

  • contains: Contains this string

Page Status Code Detector

if: page_status_code

Use this to assert that the page status code is a specific value.

Example

detect:
  - if: page_status_code
    status_code: 200

Properties

  • is: Condition is this exact integer
  • is_not: Condition is not this exact integer
  • in: Condition is in this list of integers (exact match)
  • gt: Condition is greater than this integer
  • lt: Condition is less than this integer

Local Storage Detector

if: local_storage

Use this to assert that a key is present in the local storage.

Example

detect:
  - if: local_storage
    key: 'my-key'
    value: 'pattern'

Properties

  • key: Key to match
  • value: Value to match

Session Storage Detector

if: session_storage

Use this to assert that a key is present in the session storage.

Example

detect:
  - if: session_storage
    key: 'my-key'
    value: 'pattern'

Properties

  • key: Key to match
  • value: Value to match

if: cookie

Use this to assert that a cookie is present in the browser.

Example

detect:
  - if: cookie
    key: 'my-key'
    value: 'pattern'

Properties

  • key: Key to match
  • value: Value to match

Header Contains Detector

if: header

Use this to assert that a header is present in the request.

Example

detect:
  - if: header
    key: 'my-key'
    value: 'pattern'

Properties

  • key: Key to match
  • value: Value to match