How to click a button on Active window?

Asked by Sreekanth

I've a series of actions that need to be perfomed, during this i've three popped up windows with 'OK' button on all of them. When i tried to click 'OK', it is failing to click 'OK' on the active window, instead it is pointing to 'OK' button on inactive window. Is there any method to click 'OK' on active window?
More Info: window 1 with OK btn -> pops up Window 2 with OK btn-> Pops up Window 3 with OK btn.

Question information

Language:
English Edit question
Status:
Answered
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

you might try to use App.focusedWindow():

reg = App.focusedWindow()
reg.click("ok-btn.png")

Can you help with this problem?

Provide an answer of your own, or ask Sreekanth for more information if necessary.

To post a message you must log in.