I'm assuming you're trying to actually access elements within the modal
dialog, and not just test on its return value, which Selenium already
handles. I think you may be out of luck. IE's proprietary showModalDialog()
is not part of the standard dom, and doesn't work at all like window.open().
As you noted, it's synchronous and does not return a value (even a reference
to itself) until it's closed. It also doesn't create a new window reference
for itself in the dom, unlike window.open(). No references to a window make
it very tricky to access.

Now I'm not an expert on showModalDialog() and would be happy to hear if
someone's actually figured out a way to do this. However, I tend to steer
well clear of showModalDialog() and its slightly less evil twin,
showModelessDialog().... there are better alternatives. I do not recommend a
serious attempt at making modal window objects via javascript (too many
holes, too much hackery), but if you must have modal behavior we've found a
nice solution with "modal iframes"... all the look 'n' feel of a browser
window, with (most of) the behavior of a modal dialog :) The mechanism is
pretty simple stuff, though I believe you do have to make some medium
complexity Selenium modifications so it can deal with iframes better. I can
try and give you the skinny if you're at all interested.

Elaine

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of
sriramula vallinath
Sent: Thursday, November 03, 2005 9:32 PM
To: [email protected]
Subject: [Selenium-devel] USage of showmodaldialogbox() in selenium


Hi folks,

My application uses showmodaldialogbox() api of IE in my application however
when i try to use selenium to test the same ...........i donot get the
handle for the same.

i am not able to select this dialogbox using the selectwindow function of
selenium.....

reason being the modaldialog of IE doesnot return a window object for
selenium to identify it and give the handle....


any suggestions for the above problem......

has anybody used selenium and showmodaldialogbox()...........

Thanks in Advance
Vallinath.


Yahoo! FareChase - Search multiple travel sites in one click.  << File:
ATT892468.txt >> 
_______________________________________________
Selenium-devel mailing list
[email protected]
http://lists.public.thoughtworks.org/mailman/listinfo/selenium-devel

Reply via email to