Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Not adding screenshot in execution results-RQM Junit Selenium Adapter

We are using  RQM  with RQMJunitSelenium adapter configured on remote machine and  trying to add the screenshot captured by Junit selenium code to the test execution results in RQM , But Screenshot is not saved in temp directory and also not attached to execution results,below is the code snippet used.

 

We are running the test as per the guidelines mentioned in this link:

http://www.ibm.com/developerworks/rational/library/run-automated-selenium-junit-tests/

http://pic.dhe.ibm.com/infocenter/clmhelp/v4r0/index.jsp?topic=%2Fcom.ibm.rational.test.qm.doc%2Ftopics%2Ft_configselenadp.html

 

public void takeScreenShot(String fname) throws Exception   

          File scrFile = ((TakesScreenshot)driver).getScreenshotAs(OutputType.FILE);

          String imageFileDir = System.getProperty("selenium.screenshot.dir");

          if (imageFileDir == null)

            imageFileDir = System.getProperty("java.io.tmpdir");

          FileUtils.copyFile(scrFile, new File(imageFileDir, fname));

      }

Run-time value of the property ”selenium.screenshot.dir” = C:\Users\Administrator\AppData\Local\Temp\2\QMAdapterJUnitImgs_1400829590655


RQM Version:  4.0.5

RQMJunitSeleniumAdapter  version: 4.0.5 



0 votes



One answer

Permanent link
As the snapshot is not getting saved in the temp dir, this seems like more specific to the Selenium script which you have here and not specific to the RQM Selenium adapter
Some quick searches on internet gave me a hit which may be helpful
http://blogs.steeplesoft.com/posts/2012/01/24/grabbing-screenshots-of-failed-selenium-tests/
Thanks
Vaibhav

0 votes

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121
× 218
× 43
× 14

Question asked: May 28 '14, 5:39 a.m.

Question was seen: 6,892 times

Last updated: Jun 09 '14, 2:56 p.m.

Confirmation Cancel Confirm