Hi,
I am trying to create a test case that uses a VerifyElementPresent and, depending on the outcome
of the command, It should be able to enter in an IF / ELSE condition
For instance,
f ${!LastCommandOK}
click| link=Link1
else
click| link=Link2
I have read that Katalon doesn’t support !LastCommandOK and, therefore, I am wondering how I can
detect the outcome of a test step with a Verify command. For instance if it passed or failed (True /False)
Once I get this information I suppose I could use it in a IF / ELSE condition. Unless there is another
way to do this thing.
Thanks for your support.
I will add LastCommandOK soon. Sorry for letting you and other people wait for so long.
2 Likes
Can you suggest me any workaround to do the same thing in the meantime that you add the “LastCommandOK” ?
Thanks for your support.
Brian thanks very much for your reply. The tutorial you recomended is really helpful but I would like to use only the Katalon Recorder tool without having to write code. Is it possible?
Thanks for your support.
Try using storeElementPresent | locator | variable
, then variable
will be true
or false
depends on the outcome.
2 Likes
Hi, thanks for your reply. I have tried the “storeElementPresent” and it works fine. I am wondering if there is a particular “Store”- type like command (like the “storeElementPresent” one) that checks if a checkbox is set to true and lets me store the value “True” (or “False”) into a variable.
Thanks for your support.
You could use storeValue to get the checkbox value
Command: storeValue
Target: id=MyCheckBox
Value: MyCheckBoxValue
Note that if the checkbox is checked then the value is ‘on’,
and if it is unchecked then the value is ‘off’.
You can see the values in the Log by using:
Command: echo
Target: ${MyCheckBoxValue}
3 Likes