Web Replay 2 uses a FRAMESET with a DHTML behavior attached to the
Using the function WebReplay_Navigate(), you can call the server-side code to implement pre-conditions and post-conditions on your test cases (e.g. setting up a database or checking whether the created/modified records are correct).
Using the code
Web Replay provides the following features:
- Support every feature supported by Microsoft Internet Explorer (includes Windows Integrated Authentication).
- Support HTML forms, HTML input elements, HTML hyperlinks (anchors).
- Support unnamed HTML elements: elements can be found with their associated value and/or innerText and/or HREF (an HTML element can be found based on the value of ANY attribute).
document.write"), Web Replay 2 can still play back a given scenario - it uses a timeout mecanism to find the dynamically-generated controls.
- Support simple dialog boxes ("alert" and "confirm" methods). Web Replay overrides the
window.confirm methods with custom implementations which handles scenario playback.
- Replay scenarios for servers on the same domain only (the tested web site must be on the same domain as the Web Replay application). This is due to a security limitation in Internet Explorer (cross-site scripting). For more on this limitation, please refer to the following MSDN articles:
WebReplayScenario(); it looks like this:
<A href="http://perso.wanadoo.fr/replay.grasse/freeware/WebReplay2/WebReplay2/WebReplaySDK.htm#WebReplay_Navigate" target=_blank>WebReplay_Navigate</A>
This function implements a state-machine based on the global variable
gintState; every time the requested action is successful (e.g. clicking on a button), the state is increased by 1 (state starts at 0). The state is set to -1 when the scenario is finished. In case of any error, the state is set to -2.
The utility function WebReplayScenarioAuto() can ease the process of building scenario - its input is a simple array of states (the state-machine is already implemented - no need to manage the
switch and state numbers):
<A href="http://perso.wanadoo.fr/replay.grasse/freeware/WebReplay2/WebReplay2/WebReplaySDK.htm#WebReplayScenarioAuto" target=_blank>WebReplayScenarioAuto</A>
To build a scenario file, you need to basically know the names (or ids) of the HTML elements within your web application (using the function WebReplay_FindHTMLControlWithName). Alternatively, you can use the content (text) of a control to interact with it (using functions WebReplay_FindAnchorWithText, WebReplay_FindButtonWithText, or WebReplay_FindHTMLControlFromText).
You can interact with the HTML controls using these three functions:
Points of interest
Although it's a complete re-write (v2.1 has nothing to do with Web Replay v1.0), the TODO list is still long.
Web Replay 2 TODO list
- Automated recording of scenario files.
- Play scenarios multiple times (even infinite loops to stress-test your web application).
- Batch playback of scenario files.
- Support authentication (NTLM, basic, https) and multiple login accounts.
- Use event log file (csv format?) for errors/tracing/debugging.
- Support complex dialog boxes (based on methods window.open, window.showModalDialog and/or window.showModelessDialog).
- 2005-08-19, 08:09:13 +0200 (ven., 19 août 2005) - V2.1.