Almost the same topik capture the parameters from the recorded tests and use them in Coded tests.
Decided to create folder with API standalone tests to re-use them inside my UI tests.
- API test: Get “User Status” with output parameter “status”;
- Recorded UI test: “Login”;
- Inside “Login” test I want to use my API test “User Status” using Add step -> Type = Test -> “User Status” and check that the “status” parameter is “logged in” so I need to compare it using next step;
- Compare “status” = “logged in”.
Result: “status” string is empty, but in “User Status” test results I see that I got “status”, the same with coded test as I mentioned above, tried different actions but nothing.
A bit different screenshots example:
6th Step (Api)
Reason: A lot of statuses with different pre-conditions and I don’t want to validate “status” inside API test, better to re-use one test I think.