← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #177227]: How to import other scripts

 

Question #177227 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/177227

jeromy gave more information on the question:
Sorry, seems the image was not sent in the before mail. Please check the
attachments.


2011/11/3 Fu Jiantao <fuji246@xxxxxxxxx>

> Hi RaiMan,
>
>    1. The FirefoxSettings.py is in the FirefoxSettings.sikuli diretory.
>
>    2. These scripts are used to automate the test of webpage.
>
> I've copy your demo and the error occurs, I'm just wondering how to print
> the debug info when I've added some logs in the SDK, I've tried to added
> print the see what's going on, but it won't show up, and I've tried using
> popup(). I'm unfamiliar with Jython and Java, but I use python a lot.
>
> Following is the screenshot.
>
>
>
> Maybe it's useless to add "from sikuli import *" here, but I've tried
> added and remove it, to ensure it doesn't matter.
>
>
>
>
>
>
> I'm also running on win7 and using the up-to-date sikuli. Seems very
> strange.
>
> Thanks!
>
>
>
>
> 2011/11/3 RaiMan <question177227@xxxxxxxxxxxxxxxxxxxxx>
>
>> Your question #177227 on Sikuli changed:
>> https://answers.launchpad.net/sikuli/+question/177227
>>
>>     Status: Open => Needs information
>>
>> RaiMan requested more information:
>> I just checked with the original bundle from version rc3 (r905)
>> (supposing you are using it) on my Win7:
>>
>> following scripts in the same directory:
>>
>> # main.sikuli
>> from sub import *
>> popup(myMessage)
>>
>> # sub.sikuli
>> theMessage = "Hello from sub"
>>
>> ran this with your java command from command line and it does exactly
>> what it should do.
>>
>> Questions on your structure:
>>
>> *Diretory:*
>> F:\automation>tree
>> Folder PATH listing
>> Volume serial number is 00000200 8681:45B4
>> F:.
>> ├─checkbox.sikuli
>> ├─FirefoxSettings.sikuli *1
>> ├─helloworld.sikuli
>> ├─JAVA
>> ├─logwatcher.sikuli
>> ├─meetingtest.sikuli
>> ├─Site.sikuli
>> │ ├─FirefoxSettings *2
>> │ └─IE9Settings *2
>> └─unittest.sikuli
>>
>> *1 does this directory contain the FirefoxSettings.py ?
>>
>> *2 what are these for?
>>
>> BTW:
>> The import feature of Sikuli when used to import .sikuli scripts manage
>> the image path too (means: FirefoxSettings.sikuli is automatically added to
>> the image path).
>>
>> so this is not needed in imported scripts
>> import os
>> import sys
>> cur_dir = os.path.abspath(os.path.dirname(__file__))
>> #popup(cur_dir)
>> addImagePath(cur_dir)
>> popup('\n'.join(getImagePath()))
>>
>> ... and
>> from sikuli import *
>> is not needed in Site.sikuli (but it seems to not do any harm)
>>
>> --
>> To answer this request for more information, you can either reply to
>> this email or enter your reply at the following page:
>> https://answers.launchpad.net/sikuli/+question/177227
>>
>> You received this question notification because you asked the question.
>>
>
>

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