Skip to main content

Base64 capture

I base64 decode <textRef>

Base64 decodes the text reference and binds the result to the same name in the global scope.

Where

  • <textRef> is the name of the binding containing the text to decode

    • Can be the name of any binding that contains or resolves to a text value, including a web element in which case the text in the element will be dynamically retrieved and used.

Example

  Given the data is "c29tZSBiaW5hcnkgZGF0YQ=="
When I base64 decode the data
Then the data should be "some binary data"
I base64 decode <textRef> as <name>

Base64 decodes the text reference and binds the result to the give name in the global scope.

Where

  • <textRef> is the name of the binding containing the text to decode

    • Can be the name of any binding that contains or resolves to a text value, including a web element in which case the text in the element will be dynamically retrieved and used.
  • <name> is the name to bind the decoded value to

Example

  Given the encoded data is "c29tZSBiaW5hcnkgZGF0YQ=="
When I base64 decode the encoded data as the decoded data
Then the decoded data should be "some binary data"
I base64 decode <element>

Base64 decodes the text in the given element and binds the result to the same name in the global scope.

Where

  • <element> is the name of the element containing the text to decode

Example

  Given the data can be located by class "encoded-data"
When I base64 decode the data
Then the data should be "some binary data"
I base64 decode <element> as <name>

Base64 decodes the text in the given element and binds the result to the give name in the global scope.

Where

  • <element> is the name of the element containing the text to decode
  • <name> is the name to bind the decoded value to

Example

  Given the encoded data field can be located by class "encoded-data"
When I base64 decode the encoded data as the decoded data
Then the decoded data should be "some binary data"