Modal Web Forms

Hi,

We have modal web forms within our ASP.NET web application and we are not able to record scripts for them (no script is recorded). Is there a way to make the script recorded work with modal forms?

Thanks,
Jesudhas

[225 byte] By [Jesudhas] at [2008-2-28]
# 1
Hello Jesudhas,

Can you please provide us some more details about how you display the modal dialog, or better yet some sample code. Our recorder should be able to record the modal dialogs and pop-ups unless the requests are sent via javascript. If they are sent from javascript, then you will have to manually add these requests to web test using the editor.

EricAMSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 2
Hello EircA,

1. The first screen is Logon.aspx. This gets recorded without any problems.

2. After the user types in username and pwd, user credientials are validated and the request is redirected using "Response.Redirect("default.aspx")" to another page from logon.aspx.vb. This redirection is NOT recorded

3. Default.aspx uses javascript to open a modal window using
"self.showModalDialog(......) ". This is NOT recorded either.

Currently we are using "ANTSLoad", which records all these. Will these features be included in the release version of Team Test.

Q. Is there a way of showing Modal dialogs without using JavaScripts? We are using javascript as our client side script.

Jesudhas

Jesudhas at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 3

The Web Test Recorder does not record redirects since they will be automatically followed at runtime. This can lead to more resilient tests or, at least, less cluttered tests.

As for the modal window... I'll enter this as a bug and investigate why that isn't working. The events our browser recorder uses may not be being fired by IE or, hopefully, we're just interpreting them incorrectly and it can be fixed in this release.

Here's a blog post I'm working on about how our recorder works:

Our Web Test Recorder works differently than recorders in some other web/load testing products. We actually hook IE navigation events while others use a small proxy server to intercept and record requests. There are advantages and disadvantages to both approaches.

A proxy recorder's main advantage is that it can see all HTTP traffic no matter where it's coming from (any active browser, smart client app, etc). Seeing everything can also be a disadvantage because your recording may be filled with lots of extraneous requests such as images and CSS files. Also, proxy recorders can be difficult (or impossible) to use through other proxy servers, with Windows authentication, and with SSL.

A browser recorder sees only navigation events in IE. One advantage is that your test looks logically like what you clicked on during recording. Redirects, images, CSS, and javascript files all get handled at runtime and don't clutter up your test. Perhaps the main advantage of a browser recorder (and the reason we decided on this path) is that SSL, other proxy servers, and authentication have all already been handled by the browser before any events are raised. That is, the browser recorder works exactly the same no matter what's going on at the network level.

I originally went down the proxy recorder path before we eventually opted for a browser recorder. In our next release, we're looking at using a hybrid browser-proxy recorder that could fuse the best of both worlds. In the meantime, we're working with Eric Lawrence, the creator of Fiddler, to be able to convert Fiddler recordings into web tests for those cases that aren't handled well by a browser recorder.

Josh

JoshChristieMSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 4

Hello Josh,

Based on your response, was wondering if it is true that a window.showModalDialog() does not raise/ trigger an event that I can hook on to.

I have the following html from MSDN that I picked,

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/methods/showmodaldialog.asp

saved it to a HTML file and used a vbscript that plays back this URL and traps for all events, seems like no event gets triggered when the modal dialog is popped up. Tried this on IE 6.0 SP2 on XP SP2 and Win 2k3 SP1 as well but I dont see any events getting fired at all so far. Was hoping it would trigger a NewWindow3 or a NewWindow2 but I dont seem to get either out of this.

Thanks,
Bhaskar

BhaskarVasudevan at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...
# 5

That's right. window.showModalDialog does not raise the NewWindow/2/3 events. I'm not aware of a way to capture them. We're solving this limitation in the Web Test Recorder a different way in our next release.

Josh

JoshChristieMS at 2007-9-8 > top of Msdn Tech,Visual Studio Team System,Visual Studio Team System - Web and Load Testing...

Visual Studio Team System

Site Classified