Mixin: VideoSteps

VideoSteps

Steps for video recording.

Properties:
Name Type Description
video VideoRecorder

Video recorder instance.

Source:

Methods


<protected> _makeVideoPath( [opts])

Helper to make video path.

Parameters:
Name Type Argument Description
opts object <optional>

Step options.

Properties
Name Type Argument Description
name string <optional>

File name. Extension .avi will be added automatically. Default name will be generated with uuid algorithm.

dir string <optional>

Folder to save video.

Source:
Returns:

Full video path.

Type
string

<async, protected> _videoLocation()

Helper to get video location.

Source:
Returns:

Dict of location.

Type
Promise.<object>

getVideo( [opts])

Step to get path to recorded video.

Parameters:
Name Type Argument Description
opts object <optional>

Step options.

Properties
Name Type Argument Default Description
check boolean <optional>
true

Flag to check that video is recorded and path exists.

Source:
Returns:

Path to recorded video.

Type
string

removeVideo( [opts])

Step to remove recorded video.

Parameters:
Name Type Argument Description
opts object <optional>

Step options.

Properties
Name Type Argument Default Description
check boolean <optional>
true

Flag to check step result.

Source:
Throws:

If video file wasn't removed.

Type
AssertionError
Returns:

true if step was executed, false if was skipped.

Type
boolean

<async> startVideo( [opts])

Step to start video recording. Step recall will be skipped if video recording wasn't stopped before.

Parameters:
Name Type Argument Description
opts object <optional>

Step options.

Properties
Name Type Argument Default Description
name string <optional>

File name. Extension .avi will be added automatically. Default name will be generated with uuid algorithm.

dir string <optional>

Folder to save video.

check boolean <optional>
true

Flag to check that video recording was launched.

Source:
Throws:

If video recording wasn't launched.

Type
AssertionError
Returns:

true if step was executed, false if was skipped.

Type
Promise.<boolean>

<async> stopVideo( [opts])

Step to stop video recording. Step call will be skipped if video recording wasn't launched before.

Parameters:
Name Type Argument Description
opts object <optional>

Step options.

Properties
Name Type Argument Default Description
check boolean <optional>
true

Flag to check that video recording was stopped.

Source:
Throws:

If video recording wasn't stopped.

Type
AssertionError
Returns:
  • Path to recorded video.

    Type
    Promise.<string>
  • false if step was skipped.

    Type
    Promise.<boolean>