sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #21907
Re: [Question #237738]: os.symlink not working in sikuli
Question #237738 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/237738
Status: Answered => Open
raghuveer is still having a problem:
Hi RaiMan,
Thanks for your quick reply.
Following code we are executing in sikuli
import unittest2 as unittest
import HTMLTestRunner2 as HTMLTestRunner
reload(HTMLTestRunner)
import helpers
reload(helpers)
import os
import shutil
myPath=os.path.dirname(getBundlePath())
print myPath
class main_script(unittest.TestCase):
def test01_script(self):
try:
print "python"
print i
#click("1382336023811.png")
except:
print "Fail"
assert False
def main():
helpers.loadConfig()
reportfile = os.path.join(Settings.reportdir,"report.html")
reportstream = open(reportfile,"w")
runner = HTMLTestRunner.HTMLTestRunner(stream=reportstream,
title="Test Report",
description="Test Report from MobileTestingFramework",
verbosity=1,
fwSettings=Settings)
runner.run(Settings.suite)
reportstream.close()
#generate the coverage report
if Settings.isim_coverage:
helpers.genCoverage("Total",Settings.app_sourcedir,Settings.reportdir,True)
if __name__ == '__main__':
try:
main()
except AssertionError, e:
print "ASSERTION ERROR" + str(e)
we have following modules in one folder
1.helpers.py,
2.HTML TestRunner.py
3.imageRepository.py
4. unittest2 modules
Following Error is occuring in helpers.py
\helpers.py", line 1042, in createSymlink
os.symlink(destPath,symPath)
AttributeError: 'module' object has no attribute 'symlink'.
Here our intention is to capture image as an attachment in Html report when testcase fails.
If any other solution is there please suggest me.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.