Question #226284 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/226284
Status: Needs information => Open
Chris gave more information on the question:
# coding=utf-8
from sikuli import*
from datetime import date
from datetime import datetime
#import shutil
import unittest
import HTMLTestRunner
class BDTests(unittest.TestCase):
app = App("C:\\Program Files (x86)\\Microsoft
Office\\Office14\\WINWORD.exe")
def setUp(self):
self.app.open()
wait(7)
def tearDown(self):
self.app.close()
wait(2)
def test_aInitialization(self):
with self.app.window():
sleep(2)
#The first time the code is run i get the error when it tries to run the next
line.
# In my report.html i have this error "ft1.1: Traceback (most recent call last):
#File "C:\Users\TE933E~1\AppData\Local\Temp\sikuli-tmp8791059799752513130.py",
line 40, in test_aInitialization
# click(Pattern("1368040468608.png").similar(0.05))
#FindFailed: FindFailed: Rectangle width and height must be > 0
#Line 45, in file
C:\Users\TE933E~1\AppData\Local\Temp\sikuli-tmp8791059799752513130.py
#I also removed all the regions and tried different screenshots without changes
, with changes...i'm kinda stuck.
##########################
click(Pattern("1368040468608.png").similar(0.05))
wait(5)
if exists("Ready-1.png"):
assert True
else:
assert False
#img = capture() ?
#shutil.move(img,"C:\Users\testuser454\Documents\Fail Screenshot - " +
datetime.now().strftime("%b %Y %I.%M %p") + ".png")
suite = unittest.TestLoader().loadTestsFromTestCase(BDTests)
outfile = open("C:\\Users\\testuser454\\Documents\\ISIS Test Results - " +
datetime.now().strftime("%b-%d %Y %I.%M %p") + ".html","w")
runner = HTMLTestRunner.HTMLTestRunner(stream=outfile,title='Test
Report',description='this is a demo')
runner.run(suite)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp