Can "Browser contents" be saved for offline viewing?
Hi All. I have a test which is calling an API of another app. In response a web page with results shows up. Its contents are visible in Browser Contents -> Post-Action Browser Contents. I want to save this HTML content offline. Is this possible in SOAtest?
Best Answer
-
There is another approach that you could consider, if you are simply wanting to capture what the page looks like. Consider saving screenshots of the browser into the HTML report that you generate after your test run. There are two ways of doing this:
- Tell SOAtest to capture screenshots whenever there is a test failure (this only capture screenshots on failure cases): https://forums.parasoft.com/discussion/2923/screenshots-on-failure-for-browser-tests-using-selenium-webdriver
- Add the Selenium Screenshot Tool (available on the Parasoft marketplace -
go to https://marketplace.parasoft.com and search for "Selenium Screenshot Tool") to the points in your scenario where you want to capture a screenshot
5
Answers
-
Good morning ankit,
Yes, you can save the Browser contents including the html by enabling the "Save Browser Contents" option.
You may also save the traffic in the traffic-viewer:
0 -
Thanks for your response OmarR. I did try checking the "save browser contents" box to see what happens. I couldn't find any difference after doing it. Where does it save those contents so I can view them offline later?
0 -
It saves the contents within the .tst file itself, so that if you close the .tst and later reopen it, you will see have the browser contents information available to view. The option does not save the contents outside the .tst file.
0 -
Thanks jakubiak. I was actually willing to save the browser contents.Reason is that the html I am getting as a response after running the tst is already correctly formatted to be presented to stakeholders. Only if I could automatically save offline. Is there any other way maybe by writing extra piece of code in Java/javascript?
0