Preview generates custom HTML and XML reports. It can present HTML forms. Those allow Selenese scripts to interact with the user. It can collect confirmation, selection or data entry. When the user operates Preview, it triggers further Selenese actions. That subsequent processing executes like classic Selenese run. The user can pause, stop or debug it.
Together with SelBlocks Global > Out-of-flow Selenese callbacks Preview enables a bidirectional channel between Selenium IDE and the presentation window. The report or form can subsequently call custom Selenese functions (i.e. blocks of Selenese commands). That allows user scripts to run interactively.
The content renders in a standard Firefox window. The user can bookmark it, or pass the URL to it. It uses data: URIs, hence it works without a need to pass any files. (
There are two primary ways to pass the data:
data:URL, it is either well formed or not. If well formed, then both the content and the data is guaranteed to be present.)
By default Preview generates
data: URL with base64 encoding. Following options make
data: URLs more readable:
urlEncodeData- only applicable with
dataInHash. It makes the encoded data a bit more readable (as compared to default base64 encoding).
urlEncodeContent- regardless of the source code and of how you pass the data Those options are disabled by default, since they generate longer
HTML Preview is “live” and connected to Selenium IDE, but only in the window that was opened from Selenium IDE by
getEval | editor.openPreview( templateURL, data, config ). From the content in Preview invoke Selenese functions via SelBlocks Global > Out-of-flow Selenese callbacks.
The user may not be able to navigate backwards & forwards in Preview. Otherwise links in Preview could be in conflict with Selenese state (call stack, stored variables) once the user executes any further Selenese commands.
We can’t pass the data via query string (?param1=value2¶m2=value2…) due to data: URI limitations.