How to display capture screenshot into report using Python + Webdriver + nose & xunit -


how display capture screenshot report using python + webdriver + nose & xunit ?

python script:

import unittest selenium import webdriver selenium.webdriver.common.keys import keys  class googletest(unittest.testcase):      def test_google(self):           self.driver = webdriver.firefox()         self.driver.get("http://www.google.com")         assert false, "desperately failing capture screenshot"      def teardown(self):          self.driver.save_screenshot("/tmp/screenshot.png")         print ("/tmp/screenshot.png")         self.driver.quit()         unittest.testcase.teardown(self) 

and please find report.xml

<?xml version="1.0" encoding="utf-8"?><testsuite name="nosetests" tests="1" errors="0" failures="1" skip="0"><testcase classname="sample.googletest" name="test_google" time="4.921"><failure type="exceptions.assertionerror" message="desperatly failing capture screenshot"><![cdata[traceback (most recent call last):   file "/usr/lib/python2.7/unittest/case.py", line 331, in run     testmethod()   file "/home/anuj/workspace/py_sel/sample.py", line 17, in test_google     assert false, "desperatly failing capture screenshot" assertionerror: desperatly failing capture screenshot ]]></failure></testcase></testsuite> 


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -