Click here to Skip to main content
Email Password   helpLost your password?

Click to enlarge

Introduction

Web Replay is an automated software testing tool for Web applications. It helps in detecting bugs and regressions in Web applications by replaying scenarios to test the application.

Using WebReplay, you can automatically navigate to a Web page, fill in form fields, click on the submit (OK) button, and then continue to another Web page.

To use Web Replay, build an XML Scenario File (see below), type the name of the file in the edit box and click on the Replay button.

Background (optional)

Web Replay is based on Microsoft's WebBrowser control (Microsoft� ActiveX� control). It embeds the control into a very simple dialog-based application which loads an XML scenario file and programmatically drives the WebBrowser control (via its COM Interface IWebBrowser2) to execute the scenario.

Using the code

Web Replay provides the following features:

Sample XML Scenario

An XML scenario file looks like this:

<?xml version="1.0" encoding="Windows-1252"?>
<web_replay>
  <scenario>
    <!-- Search something in codeproject -->
    <!-- Scenarios are divided into steps (one step per page download) -->
    <step>
      <!-- Every step can contain one or more actions -->
      <!-- Action can be of type "navigate" = 
             Web Replay will navigate to the given URL -->
      <action type="navigate" url="http://www.codeproject.com" />
    </step>
    <step>
      <!-- Action can be of type "control" = 
             Web Replay will interact with an HTML element -->
      <action type="control" 
             name="target" event="set_value" value="WebReplay" />
      <!-- This field is unnamed; but it has a specific value attribute -->
      <action type="control" name="" value="Go" event="click" />
    </step>
  </scenario>
</web_replay>

To build a scenario file, you need to basically know the names (or ids) of HTML elements within your Web Application. Alternatively, you can use an empty name and use the HTML element's value (for unnamed items).

Points of Interest

How do you test code? Well, just write a test program! Web Replay helps you with this by providing a simple way of testing you Web apps. But it's still a brand new program; the TODO list is long...

Web Replay TODO List

History

V1.0 - $Date: 2005-06-16 11:50:08 +0200 (Thu, 16 Jun 2005) $

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
Generalnice
Donsw
8:46 22 May '09  
Nice but no recording for replay.
You should update this with more features. Good potential

cheers,
Donsw
My Recent Article : Backup of Data files - Full and Incremental

GeneralCheck out this WebReplay...
JackNynguen
14:01 10 Apr '08  
A really nice (and free) IE-Addon also called WebReplay to automate web applications:
http://www.iewatch.com/downloadwr.aspx
Generalnavigate - error
grandmasta1
1:14 16 Nov '07  
why i can't load some urls???

e.g. ".../index.php?p=search"

i found no solution for this problem...
GeneralInCisif.net - Web Testing With C# or VB.NET
ftorres
18:17 1 Feb '07  
InCisif.net is an automation tool designed to implement client-side functional
testing of web applications under Internet Explorer 6.x or 7.x, using the C#
or VB.NET language with Visual Studio 2003, 2005 or express editions.

Version 1.2 New features:

- An interactive DOM viewer available at record time Big Grin
- NUnit support (source code available) Laugh
- TestDriven.net add-in support (source code available) Wink

Coming features version 1.3 March 2007:

- More methods to support AJAX applications Roll eyes
- IronPython support WTF
- Test/suite reporting api. Suspicious

http://www.incisif.net

Generaldialog boxes
Anonymous
11:19 20 Jul '05  
Is it possible to automatically select certain buttons on dialog boxes that a web site initiates and/or that the web browser initiates (e.g. for a web site --- "click Yes to indicate you agree to the terms and conditions", and for a web browser --- "you are being redirected, is this ok?")

The latter issue isn't so bad since those can be tweaked in the registry, but the former problem I have no idea how to address. What do you think? Thanks.
GeneralRe: dialog boxes
Emmanuel Kartmann
23:32 16 Aug '05  
For automated testing (not browsing external Web Sites), Web Replay 2 (a complete rewrite implemented 100% in Javascript) can support some dialog boxes (alert and confirm); maybe it can address your needs:

http://www.codeproject.com/useritems/WebReplay2.asp[^]
GeneralAutomatically retreving the fields
TrappedVector
4:21 24 Jun '05  
Hi,
instead of examining the page to be tested and writing the xml file by hand, can't a html js file be created which opens in a fixed frame in the webcontrol and the test page opens in the second frame.The js page can enumerate all the input tag vlaue names and ask the user(in a HTML form) to seect the fields in which he is interested to test.Furthermore the js page can aumtaically decide to invoke click on some elements like button aumatically.
So the whole task can be divided into two phases.
Step 1 of 2:Let the prog examine the test page and ask the user's preference to select the elements and type of test.
Step 2 of 2:The actual test(which is currently in place).

That should not be a daunting task in javascript and will reduce user effort to minimum.

Regards
TrappedVector

I dont have a flikering mind.I always take quick decisions,the wrong ones.
GeneralRe: Automatically retreving the fields
Emmanuel Kartmann
23:47 25 Jun '05  
I was thinking about giving up the XML file anyway.
I need (for my own Web app) to execute "external commands" anyway, so the scenario file will probably end up being a PROGRAM, and Web Replay will generate and replay this program. Scripting (javascript?) sounds appealing to me - any help/suggestion welcome at this point...

Regards,

E.

GeneralRe: Automatically retreving the fields
Emmanuel Kartmann
23:35 16 Aug '05  
Thanks!

Your idea of FRAMES+Javascript has been the key to a complete rewrite of Web Replay; it can't record scenarios (yet) but is implemented 100% in Javascript (bye bye C/C++ and COM!):

http://www.codeproject.com/useritems/WebReplay2.asp[^]

I'll be working on the recording (Javascript format!) soon...

Best regards,

E.

Generalselect option
voltek60
14:06 23 Jun '05  
it is possible to use :

"control" name="option1" event="set_value" value="100" />
in order to change the html :

<select name="option1"> <option>100</option> <option>101</option> </select>
??
GeneralRe: select option
Emmanuel Kartmann
21:06 23 Jun '05  
Hi,

No you can't use Web Replay with this HTML. You need to assign a VALUE to every option in your select:

<select name="option1">
<option value="100">100</option>
<option value="101">101</option>
</select>

Please note that the value doesn't have to be the same as the label; the value is sent by the browser to your server.

It's possible to add the ability to select an option based on its label (attribute "innerText") - but you need to adapt the code from WebReplay for this...

E.


GeneralRe: select option
voltek60
21:58 23 Jun '05  
Thank you for your response

But I must modify a "select" where attribute "value' is not written.

So, I try the attribute "innerText" but why I need'nt to adapt the code ?

V.
Generalsome wrong in this application where i build it.
winart
16:53 21 Jun '05  
When i build this application ,
it display follow as:
d:\Projects\C#\WebReplay_src\WebReplayDlg.cpp(659): error C2678: 二进制“==” : 没有找到接受“VARIANT”类型的左操作数的运算符(或没有可接受的转换)
why??

No pain no gain!
GeneralRe: some wrong in this application where i build it.
Emmanuel Kartmann
20:32 21 Jun '05  
Hi winart,

Can you translate the error text in english?
What version of Visual Studio are you using?
What's on the line 659 of WebReplayDlg.cpp? (I've made changes to the code since the last posting and there no line 659 anymore...).

E.

GeneralRe: some wrong in this application where i build it.
winart
0:13 22 Jun '05  
it display follow as:
d:\Projects\C#\WebReplay_src\WebReplayDlg.cpp(659): error C2678: binary system “==” : Can't find the left operator accepting the type“VARIANT”(or can't accept the switch why??



if (SUCCEEDED(hResult) && pEltColl)
{
// We are assuming there's only one element with that name on the page,
// else you must expect a collection instead of a single element.
if (name == L"" && BSTRElementValue != L"") //////////this is the line 659
{
// Search by value (manual search with a loop on all HTML Elements in document - could be long!)
long intElements = 0;


No pain no gain!
GeneralRe: some wrong in this application where i build it.
Emmanuel Kartmann
21:09 22 Jun '05  
What version of Visual Studio are you using?
Are you using a specific configuration (e.g. UNICODE?)?

Try to convert the L"" into an object - something like:

if (name == _bstr_t("") && BSTRElementValue != L"")


Hope this helps,

E.

GeneralLook at SWExplorerAutomation
Alex Furman
11:44 17 Jun '05  
Look at SWExplorerAutomation
(http://home.comcast.net/~furma­na/SWIEAutomation.htm) .

It supports frames, popup windows, dialog boxes and file downloads.

SW Explorer Automation (SWEA) creates an object model (automation
interface) for any Web application running in Internet Explorer. The
object model is defined visually by SWEA designer. The designer allows
to record scripts (C# and VB) based on the defined application object
model.



AlexF
GeneralRe: Look at SWExplorerAutomation
Emmanuel Kartmann
3:53 20 Jun '05  
I can't get the page you recommended; the error message is:

Page URL Not Found!! The requested page does not exist on this server. The URL you typed or followed is either outdated or inaccurate.

E.

GeneralRe: Look at SWExplorerAutomation
Alex Furman
7:07 20 Jun '05  
The URL is correct. It can be a problem with the server provider.

http://home.comcast.net/~furmana/SWIEAutomation.htm[^]

Alex.


AlexF
GeneralRe: Look at SWExplorerAutomation
Emmanuel Kartmann
6:22 23 Jun '05  
Right - it works now.

Great program - and generating a .NET program is a very cool approach (for deployment/playback - a breeze!).

Shame it's not freeware / open source...

Thanks a lot Alex!

Regards,

E.

GeneralIs that possible to use on Win CE?
Paul_Lai
23:26 16 Jun '05  
The code is pretty nice. But I am wondering if it could make a Win CE version of WebReplay?

Paul Lai
GeneralRe: Is that possible to use on Win CE?
Emmanuel Kartmann
23:51 16 Jun '05  
Probably, since the WebBrowser control is available on this platform (at least the latest one):

http://msdn.microsoft.com/library/en-us/wcehtml/html/ceconUsingWebBrowserControls.asp[^]

http://msdn.microsoft.com/library/en-us/wceshdoc/html/ceconAddingInternetBrowsingFunctionalityToYourApplication.asp[^]

There are probably differences between this version and "regular" windows since Internet Explorer itself is different (some HTML tags are not implemented, some HTML events not handled, etc...). But WebReplay should work fine.

E.

GeneralMissing file
Todd Smith
13:13 16 Jun '05  
WebReplay.rc(242) : fatal error RC1015: cannot open include file 'res\WebReplay.rc2'.



Todd Smith
GeneralRe: Missing file
Emmanuel Kartmann
21:41 16 Jun '05  
Oups.

The whole "res" subdirectoy is missing from the source zip file. I'll make a new version ASAP. In the meanwhile, you can download res subdirectory here:

http://perso.wanadoo.fr/replay.grasse/freeware/WebReplay/WebReplay_res.zip[^]


Sorry for the inconvenience,

E.

GeneralVery nice!
netclectic
6:07 16 Jun '05  
Nice article, I did something similar a while ago (using Delphi) and remember having a problem trying to simulate a multi user stress test with multiple browsers in seperate threads. The problem was that i wasn't able to find a way to stop multiple browsers sharing the same session.



Last Updated 16 Jun 2005 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2010