← Back to team overview

sikuli-driver team mailing list archive

[Question #266528]: app.focus() not working after window title change (Windows 8.1)?

 

New question #266528 on Sikuli:
https://answers.launchpad.net/sikuli/+question/266528

I'm focussing on an application via its window title, but finding that further calls to focus() don't work after the app has changed window title. Basically what I want to do is return focus to the application under test after doing popup(). My application changes its window title somewhat frequently, and I'd prefer to be able to only put the initial title (which is reliable) in my script if I possibly can.

so

app = App.focus("Initial title")

... do stuff that cause the window title to change

if popAsk("Shall we continue?"):
    app.focus() # this does not work
   newApp = App.focus("new title") # this does work, but the new window title depends heavily on the current state
   ... do more stuff

app.close() # this does not seem to care about the title changes, and works anyway

I wonder if Sikuli has stored the initial window title and if app.focus() is looking for it again? That would explain why it doesn't work in this case.


-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.