← Back to team overview

sikuli-driver team mailing list archive

[Question #296141]: hasWindow always returns False

 

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

Hi!

I am writing a basic script and want to print some information about my app, like isRunning(), getPID() etc. Everything works fine until hasWindow() is run, after that getPID returns -1 and isRunning() returns False. Here's my code and the output:

calc = App("myApp")
calc.open()
print 'Running: ' + str(calc.isRunning())
print 'Window title: ' + str(calc.getWindow())
print 'PID: ' + str(calc.getPID())
print 'Name: ' + calc.getName()
print 'Has window: ' + str(calc.hasWindow())
print 'Running: ' + str(calc.isRunning())
print 'Window title: ' + str(calc.getWindow())
print 'PID: ' + str(calc.getPID())
print 'Name: ' + calc.getName()

Output:

[log] App.open [23902:myApp]
Running: True
Window title: 
PID: 23902
Name: myApp
Has window: False
Running: False
Window title: 
PID: -1
Name: myApp

What causes this problem? Is something wrong with hasWindow()?

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.