Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
187 views
in Selenium by
recategorized by

I want to Email my TestNg report to other users as well but when they are clicking on the screenshot link. They are not able to see the screenshot as it is stored in my local machine.

How i can attach the screenshot so that other ppl can also view the report.

 String SaveandReturn =  ScreenShot.takeScreenShot("SaveAndReturnverification");
  Reporter.log("<a href=\"" + SaveandReturn + "\"><p align=\"left\"> Add Sub Service in LFA Services  screenshot at " + new Date()+ "</p>");
}

1 Answer

0 like 0 dislike
by The go-to Tester (181 points)
selected by
 
Best answer
You need to take screenshot, move it to your report directory and provide that path to Reporter.log. Also make sure while adding file to zip to email, you are including screenshots inside zip file.


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...