sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #56060
Re: [Question #693855]: NameError name 'ClassName' is not defined
Question #693855 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/693855
Status: Answered => Open
DH is still having a problem:
Hi RaiMan, thanks for ypur answer :-)
I did lika you told me:
The two files
* HTMLTestRunner.py
* HTMLTestRunner$py.class
are located in the same folder as sikulixide-2.0.4.jar is and I even put
the files where I've my test script "ClassName.py"
C:\Sikuli
- HTMLTestRunner.py
- HTMLTestRunner$py.class
-- Scripts\ClassName
--- HTMLTestRunner.py
---HTMLTestRunner$py.class
My test class as follows:
from sikuli import *
import unittest
import HTMLTestRunner
fileCreate = str(time.strftime(("%Y:%m:%d_%H:%M:%S")))
fileName = "C:\\Sikuli\\Reports\\{}_Testreport_MyReport.html".format(fileCreate.replace(':', '_'))
class ClassName(unittest.TestCase):
def test_StartPage(self):
type( "\\Images\\windows_searchbar.png", 'Edge')
click("\\Images\\windows_edge.png")
assert False
def isAborted(self):
return False
suite = unittest.TestLoader().loadTestsFromTestCase(ClassName)
outfile = open(fileName, "w")
runner = HTMLTestRunner.HTMLTestRunner(stream=outfile, title=' My report Title', description='Some desc..' )
runner.run(suite)
Now gives the error:
[error] script [ ClassName ] stopped with error in line 22
[error] AttributeError ( 'HTMLTestRunner' object has no attribute 'isAborted' )
[error] --- Traceback --- error source first
line: module ( function ) statement
22: main ( <module> ) runner.run(suite)
[error] --- Traceback --- end --------------
What I can see I've added isAborted to my class? Or what?
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.