← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #186050]: Most "captures" show up as file names not pics

 

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

    Status: Needs information => Open

Roland Prancan gave more information on the question:
Thanks again for getting back to me, RaiMan.

I'm running Mac OSX 10.6.8
Sikuli X-1.0rc3
Java 1.6.0_29

And I am usin the unittest feature.

The other thing I noticed is that in the directory where this code lives
there is a file called
*somefile.sikuli* and it doesn't show all the pic files. I have to go into
console window  to see them.

Here is a code snippet ...

*#!/usr/bin/env python*
*# encoding: utf-8*
*"""*
*TestHTMLTest.py*
*
*
*Created by Roland Prancan on 2012-01-05.*
*Copyright (c) 2012 __J__. All rights reserved.*
*"""*
*import time*
*import sys*
*import os*
*import unittest*
*import HTMLTestRunner*
*print "hello"*
*closeApp("/Applications/Titanium Studio/TitaniumStudio.app")*
*
*
*            *
*class  BDTests(unittest.TestCase):*
*    *
*    def setUp(self):*
*        print("setting things up")*
*              *
*        openApp("/Applications/Titanium Studio/TitaniumStudio.app")*
*      *
*        *
*    def testSeaTow_A_OpenAppTest(self):*
*        print ("Running SeaTowOpenAppTest")*
*        *
*        if exists("Selectaworks.png",60):*
*            click("1325879855448.png")*
*        wait("1325879507847.png",140)       *
*        Run = ("1325879507847.png")*
*        wait(Run,100)*
*        click(Run)*
*        wait(Pattern("1327330724855.png").similar(0.60),100)*
*#        if
exists(Region(294,26,1146,825).inside().find("SeaTowRealwo-2.png"),30):*
*#            print("Found SeaTow Location field")*
*#            currentLocation =
find(Region(294,26,1146,825).inside().find("SeaTowRealwo-2.png"))*
*#
 click(currentLocation.inside().find(Pattern("1327330724855.png").similar(0.60)))
*
*        click(Pattern("1327330724855.png").similar(0.60))*
*        if exists("Imreadweathe.png",5):*
*            click("1327330293931.png")*
*        print "SeaTow Ready"  *
*        *
*
*
*
*
*    def testSeaTow_B_MainTest(self):*
*        print ("running SeaTowMainTest")*
*
*
*        if exists("1327090804023.png"):*
*           click("1327090804023.png")*
*        name = (Region(1095,170,331,584))*
*        if exists("NBITIB.png",3):*
*           type("a.png","Joe Boater")*
*
*
*"every file before this is a picture, every file after is as is"*
*           click("1327090924818.png")*
*        *
*        elif exists("JcoBcator.png",3):*
*           name.highlight(3)*
*           name.click("P9JcoBcator.png")*
*           wait(3)*
*           name.click("JoeBoateil.png")*
*           click(Pattern("1325778351799.png").similar(0.88))*
*           click(Pattern("1325775338673.png").similar(0.82))*
*           type(Pattern("a.png").similar(0.90),"Joe Boater")*
*           click(Pattern("1327091137028.png").similar(0.78))*
*.*
*.*
*.*
*.*

*
suite = unittest.TestLoader().loadTestsFromTestCase(BDTests)
*
*
file_location = "/Users/rprancan/Work/SikuliScripts/Sea-Tow/Results/"
*
*
file_name = "Report_Sikuli_08a3363a49_2.html"
*
*
# split the filename into name and extension
*
*
fname, ext = os.path.splitext(file_name)
*
*
# use year_month_day_hour_min_sec  (24 hour format)
*
*
timestamp = time.strftime('%Y_%m_%d_%H_%M_%S')
*
*
# rebuild the filname
*
*
new_filename = fname + timestamp + ext
*
*
print( new_filename )
*

*


*

*
outfile = open((file_location + new_filename),"w")
*
*
runner =
HTMLTestRunner.HTMLTestRunner(verbosity=2,stream=outfile,title='Test
Report',description= new_filename)
*
*
#openApp("/Applications/TitaniumStudio/TitaniumStudio.app")
*
*
runner.run(suite)
*
*
closeApp("/Applications/Titanium Studio/TitaniumStudio.app")
*
*

*
*
print "Goodby"
*
*
#if __name__ == '__main__':        HTMLTestRunner.main()
*

*

*
*           *

On Tue, Jan 31, 2012 at 3:30 AM, RaiMan <
question186050@xxxxxxxxxxxxxxxxxxxxx> wrote:

> Your question #186050 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/186050
>
>     Status: Open => Needs information
>
> RaiMan requested more information:
> --- Man I'm really hosed now
> I really feel with you.
>
> But if you do not give more information, I can only feel with you, but
> not help you.
>
> What OSX?
>
> Newest Java version?
>
> What are you doing with Sikuli? script example?
>
> Using the IDE unittest feature?
>
> You might send me your stuff zipped together with additional information
> to my mail at https://launchpad.net/~raimund-hocke. Since I am Mac
> (Lion), I could have a deeper look at it.
>
> --
> 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/186050
>
> You received this question notification because you asked the question.
>


-- 
Roland Prancan
617-990-4773
rprancan@xxxxxxxxx

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