Problem:
Why does the Virtual User Output File show rendered HTML instead of parsed data when I try to use WebParseDataBound function to parse a whole page of text?
Resolution:
QUESTION
----------------------------------
Why does the Virtual User Output File show rendered HTML instead of parsed data when I try to use WebParseDataBound function to parse a whole page of text?
ANSWER
----------------------------------
With the introduction of the TrueRoute SilkEssential, the WRT file was enhanced to be able to recognise and display the output produced by the TrueRoute SilkEssential as an HTML page. If the WRT file contains text like this
Release Notes -- SilkPerformer V Siebel Add-On
it will try and display the content of the file as a web page.
So if we parse a complete web page
WebParsedDataBound (sData, sizeof (sData), null, null); WebUrl ("http://gmo.demo.com"); Writeln (sData);
The .WRT file will try and display the rendered HTML for the GMO home page instead of showing the HTML text that is stored in the variable (sData).
To stop the WRT file from displaying the web page, do the following before writing the data into the WRT file
WebParsedDataBound (sData, sizeof (sData), null, null); WebUrl ("http://gmo.demo.com"); // Writeln("") // Writeln (sData);
The WRT file will contain
PLAINTEXT
Release Notes -- SilkPerformer V Siebel Add-On
This will force the WRT to display only the text content and not display the content as a web page.