Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Step<ArgsType, ReturnType>

Steps consist of a description and an execution function. The execution function performs changes to the state of the tested application and the description briefly summarizes these changes in natural language.

A step can be parameterized by passing step arguments and a step callback (both of which are optional) to the execution function:

Step arguments are key-value pair objects that provide dynamic values to the state changes of the execution function. They also enable the interpolation of a step's description by replacing %{key} in the description string with key's value retrieved from the step arguments object).

Step callbacks can be used to query and validate the state of the tested application right after step execution. A step callback will be passed the return value of the execution function as its first parameter.

template

ArgsType defines the type of the step arguments passed to the execution function.

template

ReturnType defines the return type of the execution function.

Type parameters

  • ArgsType: Object

  • ReturnType

Hierarchy

  • Step

Implements

Index

Constructors

Properties

Object literals

Constructors

constructor

  • new Step(params: IOptStepParams<ArgsType, ReturnType>, executionFunction: function): Step
  • Steps consist of a description and an execution function. The execution function performs changes to the state of the tested application and the description briefly summarizes these changes in natural language.

    A step can be parameterized by passing step arguments and a step callback (both of which are optional) to the execution function:

    Step arguments are key-value pair objects that provide dynamic values to the state changes of the execution function. They also enable the interpolation of a step's description by replacing %{key} in the description string with key's value retrieved from the step arguments object).

    Step callbacks can be used to query and validate the state of the tested application right after step execution. A step callback will be passed the return value of the execution function as its first parameter.

    template

    ArgsType defines the type of the step arguments passed to the execution function.

    template

    ReturnType defines the return type of the execution function.

    Parameters

    • params: IOptStepParams<ArgsType, ReturnType>

      encapsulates the following step parameters: description, step arguments and step callback

    • executionFunction: function

      changes the state of the tested application

        • (args: ArgsType): ReturnType
        • Parameters

          • args: ArgsType

          Returns ReturnType

    Returns Step

Properties

__description

__description: string

A step's description.

Intended for framework-internal usage only.

execute

execute: function

Executes the parameterized step.

If a step is used as a parameter of given, when or and, this function will be invoked automatically.

Calling this function manually is only needed when invoking a step from inside the body function of another step.

param

the prefix of a nested step (titles of its "upper" steps in the nesting hierarchy)

Type declaration

    • (prefix?: string): void
    • Parameters

      • Optional prefix: string

      Returns void

Static Private _patchedBrowser

_patchedBrowser: boolean = false

Indicates whether browser object was already patched to create stacktrace which can be displayed on selenium errors and show the line number in the testcase where the error occurred.

Object literals

Static Private _commandBlacklist

_commandBlacklist: object

Defines for which functions of the browser object no patched stacktrace should be created.

actions

actions: boolean = true

addCommand

addCommand: boolean = true

alertAccept

alertAccept: boolean = true

alertDismiss

alertDismiss: boolean = true

alertText

alertText: boolean = true

applicationCacheStatus

applicationCacheStatus: boolean = true

back

back: boolean = true

background

background: boolean = true

call

call: boolean = true

catch

catch: boolean = true

close

close: boolean = true

closeApp

closeApp: boolean = true

commandList

commandList: boolean = true

context

context: boolean = true

contexts

contexts: boolean = true

cookie

cookie: boolean = true

currentActivity

currentActivity: boolean = true

defer

defer: boolean = true

deleteCookie

deleteCookie: boolean = true

desiredCapabilities

desiredCapabilities: boolean = true

deviceKeyEvent

deviceKeyEvent: boolean = true

end

end: boolean = true

endAll

endAll: boolean = true

eventNames

eventNames: boolean = true

finally

finally: boolean = true

frame

frame: boolean = true

frameParent

frameParent: boolean = true

getAppStrings

getAppStrings: boolean = true

getCurrentDeviceActivity

getCurrentDeviceActivity: boolean = true

getCurrentPackage

getCurrentPackage: boolean = true

getDeviceTime

getDeviceTime: boolean = true

getNetworkConnection

getNetworkConnection: boolean = true

getPrototype

getPrototype: boolean = true

gridProxyDetails

gridProxyDetails: boolean = true

gridTestSession

gridTestSession: boolean = true

hideDeviceKeyboard

hideDeviceKeyboard: boolean = true

imeActivate

imeActivate: boolean = true

imeActivated

imeActivated: boolean = true

imeActiveEngine

imeActiveEngine: boolean = true

imeAvailableEngines

imeAvailableEngines: boolean = true

imeDeactivated

imeDeactivated: boolean = true

init

init: boolean = true

inspect

inspect: boolean = true

installApp

installApp: boolean = true

isAndroid

isAndroid: boolean = true

isAppInstalled

isAppInstalled: boolean = true

isExecuted

isExecuted: boolean = true

isIOS

isIOS: boolean = true

isLocked

isLocked: boolean = true

isMobile

isMobile: boolean = true

isMultiremote

isMultiremote: boolean = true

lastPromise

lastPromise: boolean = true

lastResult

lastResult: boolean = true

launch

launch: boolean = true

localStorage

localStorage: boolean = true

localStorageSize

localStorageSize: boolean = true

location

location: boolean = true

lock

lock: boolean = true

log

log: boolean = true

logTypes

logTypes: boolean = true

logger

logger: boolean = true

next

next: boolean = true

openNotifications

openNotifications: boolean = true

options

options: boolean = true

orientation

orientation: boolean = true

pause

pause: boolean = true

prependListener

prependListener: boolean = true

prependOnceListener

prependOnceListener: boolean = true

promise

promise: boolean = true

removeApp

removeApp: boolean = true

requestHandler

requestHandler: boolean = true

saveScreenshot

saveScreenshot: boolean = true

screenshot

screenshot: boolean = true

sessionId

sessionId: boolean = true

sessionStorage

sessionStorage: boolean = true

sessionStorageSize

sessionStorageSize: boolean = true

setImmediateValue

setImmediateValue: boolean = true

setNetworkConnection

setNetworkConnection: boolean = true

settings

settings: boolean = true

source

source: boolean = true

status

status: boolean = true

then

then: boolean = true

timeouts

timeouts: boolean = true

timeoutsAsyncScript

timeoutsAsyncScript: boolean = true

timeoutsImplicitWait

timeoutsImplicitWait: boolean = true

transferPromiseness

transferPromiseness: boolean = true

unify

unify: boolean = true

window

window: boolean = true

windowHandle

windowHandle: boolean = true

windowHandleFullscreen

windowHandleFullscreen: boolean = true

windowHandleMaximize

windowHandleMaximize: boolean = true

windowHandlePosition

windowHandlePosition: boolean = true

windowHandleSize

windowHandleSize: boolean = true

windowHandles

windowHandles: boolean = true

Generated using TypeDoc