Hi can advice me on passing the variable from Test Case A (call in test case B) & Test Case B
In below script i have define a variable named ProspectName (highlighted in red).
Thank you very much for your topic! It may take a little while before Katalon team member or others forum members respond to you.
In the meantime, you can double-check your post to see if you can add any extra information i.e. error logs, HTML codes, screenshots, etc. Check out this posting guide to help us help you better!
Although you are not supposed to need it, you can always put in an explicit “return” statement of your intended result you want to send back to “CreatedProspectName” variable. So, in your calledTestCase(), as the last line you have like below:
and in your variable, CreatedProspectName, you should have the contents of what you want.
Edit: looking at your code more, I also think you should not be sending “ProspectName” in your parameters, but getting it from your code through the return statement, like I have above. Whatever you send into the calledTestCase will just be overwritten by the “getText” statement (which is what you want), but the variable which you have defined within the code you may be getting a different object as compared to the one in your parameters, even though they have the “same” name.
Screenshots are incovenient for others in the forum to understand your code.
If you want to be advised, please share the whole source code of your Test Case A and Test Case B so that others can copy&paste them into their local machine and try to run them.
If you can not share the source of “Test Case A” and B due to security reason, please create another set of smaller test cases which does not contain any “secure” stuff but can demonstrate your problem (passing values between test cases).
Please use the “Code Formatting Syntax” so that the codes are better presented as follows: