Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

Problem

If we wish to pass the encrypted value as a stored variable, the encrypted value is not displayed as encrypted while execution.

Suppose you have created a workflow that re-uses a component & you pass the values as stored variable before calling that particular component.

Ex.

Component

Keyword

Object

Data

copyStringValueTo

String to Store : String1 (data type : Fixed Encrypted)
In variable : var
Left Boundary (Optional) :
Right Boundary (Optional) :

Component 1

setValue

username

Value : username (data type : Stored Variable)
Execution Mode (Optional) :

setValue

password

Value : var (data type : Stored Variable)
Execution Mode (Optional) :

<Steps to execute>

Component 2

verifyElementVisible

Login

copyStringValueTo

String to Store : String2
In variable : var
Left Boundary (Optional) :
Right Boundary (Optional) :

Component 1

setValue

username

Value : username (data type : Stored Variable)
Execution Mode (Optional) :

setValue

password

Value : var (data type : Stored Variable)
Execution Mode (Optional) :

When you execute such test, the encrypted value is not displayed as encrypted while execution.

Solutions

Solution A : Using copyStringValueTo & setValue keywords

Steps :

  1. Use copyStringValueTo as expected
    For param 1 (String to store), select the data-type as Fixed Encrypted & enter the string to store.
    For param 2 (In Variable), enter the variable name ( Ex. var )

  2. Use setValue
    For param 1 (Value), select Fixed Encrypted as the data-type and enter variable name within curly braces ( Ex. {{var}} )

  3. Save and Execute the test.

Result :

The encrypted values are displayed as encrypted.

Solution B :

  1. Break the workflow into multiple tests so that the particular component is used only once in the test.

  2. Then pass the value of the component as Data Table Encrypted.


  3. Save the test & execute them.
    To execute the tests locally, in order to debug, do not forget to add launchApp keyword in the beginning (if not already added).

If you wish to run the tests (created following Solution B) remotely, then follow the below steps :

  • Create a suite

  • In the suite, add the tests one by one, in correct sequence.

  • Navigate to the execution screen.

  • Select the Suite and execute the tests.
    The correct values will be fetched from the data grid.

Result :

The encrypted values are displayed as encrypted.

  • No labels