Skip to main content

Screenshot capture

I capture the current screenshot

Captures the current screenshot and attaches it to the Gwen report.

Example

  Given the todo field can be located by class "new-todo"
When I navigate to "https://todomvc.com/examples/react/dist"
And I enter "Walk the dog" in the todo field
And I capture the current screenshot
I capture the current screenshot as <name>

Captures the current screenshot, attaches it to the Gwen report, and binds the filepath of the saved image to the given name in the global scope.

Where

  • <name> the name to bind the captured image filepath to

Example

  Given the todo field can be located by class "new-todo"
When I navigate to "https://todomvc.com/examples/react/dist"
And I enter "Walk the dog" in the todo field
And I capture the current screenshot as the screenshot image
Then the screenshot image should contain "path/to/image.png"