I've recorded a script doing subinventory transfer transaction and added databank with list of items, from/to subinvs/locators, quantity, and it all works fine when there is sufficient inventory available to transfer.
However, I want to be able to handle exceptions where popup message window opens due to there being insufficient inventory.
In this scenario I want to log a warning, take screenshot, click [Cancel], clear the record, and then continue with the next record in the databank.
Please can someone advise what I can use to do a Boolean check for the appearance of the popup window (the Xpath is "//forms.choiceBox" and the title of the window is "Caution"), so that I can then conditionally do the above actions (which I have the java for already), or otherwise if the popup doesn't appear just do the normal Save record and continue to the next?
The only approach I've had limited success with is to just put an exception wrapper around the normal Save record (because that fails when the popup is open), but this results in an unwanted failure being logged in the test, when I really just want a warning,
Thanks in advance, Jeff