When a search is performed in the application window, a dialog appears soon afterwards with a ‘Processing…’ message and a ‘Cancel’ button.
I’m trying to click on the ‘Cancel’ button programmatically in Groovy Java. However the following statement produces an error.
cancelBtn = rc.getComponent("buttonCancel", 10000)
class de.qfs.apps.qftest.shared.exceptions.ComponentNotFoundException: Element not found
I have the above statement in a try catch block inside of a loop which retries the getComponent command every 200 milliseconds, but the statement never passes.
I think the problem is related to the ‘buttonCancel’ object is underneath a JDialog window which is separate from the main application.
I’ve been able to click the ‘Cancel’ button using Record and Replay, but I can’t repeat the same transaction in Groovy Java.