It's all about the answers!

Ask a question

Not adding screenshot in execution results-RQM Junit Selenium Adapter

shyam Gorantala (611) | asked May 28 '14, 5:39 a.m.
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:


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("");

          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 

One answer

permanent link
Vaibhav Srivastava (2861) | answered May 29 '14, 4:15 a.m.
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

Your answer

Register or to post your answer.