ATF: Custom UI Step Config - Assign Output Variable value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2023 07:45 AM - edited 07-20-2023 05:30 AM
Hello all,
I have a custom UI Step Config where I am using input and output variables. So, in the Step Execution script area, trying to assign some value to the output variable like:
step.outputs.my_variable_column_name = "some value";
I can get the input variables value like step.inputs.my_varibale_column_name so, tried to use same way to assign the value to the output variable like abobe, but this is not working and getting error:
Cannot set properties of undefined (setting 'my_variable_column_name')
On the other hand, I did check a server side custom Step Config, where they have used something like below, and working.
So, wondering on how to assign the output variable value in custom UI step config. Either assigning value to output variable or to a shared test parameter would help in these situation.
Consider the situations:
1. I have a test suite with related tests of same functionality like Creating a record in [Test1], and using the same record by utilizing the Open Existing Record step in [Test2] - Assigning the Record ID to Shared Parameter in [Test1] and using the same in [Test2] would help to achieve this.
Including the complete workflow in a single test is not manageable/maintainable and not good for UI automation considering the flakiness. So, need to split the validations and make it more maintainable and reusable.
2. Same way, if we need to pass a value from one test step to subsequent steps in the same test, assigning to output variable and using the same in further steps is required
Appreciate any inputs.