[1.1.4] someApp.open(time): Array index out of bounds exception

Asked by Gabe Blumenstock

Hi!
Im having an issue when i try to run app.open i get an array index out of bounds exception. On first glance it looks like it was solved in the issue:
https://answers.launchpad.net/sikuli/+question/678181
which mentions that in builds 245 and above it should be fine, I'm seeing this bug while using build 288

Here is my code

from sikuli import *

Debug.on(3)
App.logOn()
myApp = App('myApp')
appWindow = myApp.open(10)
wait(2)
myApp.window().highlight(2)
myApp.focus()
myApp.close()

and the logging looks like this:

[AppLog] App.create: [-1:myApp]

[error] script [ opentest ] stopped with error in line 6
[error] java.lang.ArrayIndexOutOfBoundsException ( java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 )

Thanks in advance!

Question information

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

what system?
Is 'myApp' the application name? Where is it located?

I just realised, that the docs are not updated yet to the latest implementation details, sorry.
(myApp.open() returns True or False)

the code should look like this:

myApp = App('myApp')
if myApp.open(10):
    myApp.window().highlight(2)
    myApp.close()
else:
   print myApp, "did not open"

... but this should reveal the same exception

BTW: logging does not reveal any helpful information here, because the system specific implementation of the App features does not log anything (this is the reason for the extra log switch in App class).

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Needs information' state without activity for the last 15 days.