← Back to team overview

sikuli-driver team mailing list archive

[Question #168166]: script failing when put in a library

 

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

Hi !
I'm just discovering this great tool from this morning.
I'm currently doing an evaluation since I need a tool to automate tests on a FLEX application.

I've made a single script which open IE, launch the application, then log into, checks some things, log-out and write a log txt file. 

Without any skills in python nor sikuli, i've been able to do this in few hours, so this why i call this a great tool... :)

I've got a lot of Test Cases to automate, so i'm looking for the next step : creating a test repository. So I have to be able to create launcher scripts which run other scripts or call libraries. I've made a test : my main script is now saved as a library (with def myscript() at the begiining, indent for all the script, and return at the end).

I've a new main script which read the library and then do a call to myscript().

The beginning works well (IE is corectly launch), but the script failed at the first "click".

at org.sikuli.script.Region.handleFindFailed(Region.java:349)  
at org.sikuli.script.Region.wait(Region.java:420)  
at org.python.proxies.sikuli.Region$Region$1.super__wait(Unknown Source)  
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)  
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)  
at java.lang.reflect.Method.invoke(Unknown Source)   
org.sikuli.script.FindFailed: FindFailed: can not find 1313490084187.png

I don't understand this error... Does the script failed to find the image on the screen (but it work when it runs as main script) or the problem is that the script can't find the image on disk ? (because the main script is saved in another directory) ?
If the problem is about relative pathfile names, how can I set an absolute pathfile name for all the script ?

Thanks for your help !


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