Hi All

I have a html page (modal_dialog_launcher.html) which contains a modal
dialog box(modal_dialog.html):

modal_dialog_launcher.html:

<html>
<head>
<title>Modal Browser Dialog Launcher</title>
</head>
<body>
<h1>Modal Browser Dialog Launcher</h1>
<input type = "button" value = "Launch Dialog" onclick =
"javascript:document.all.modaloutput.value=window.showModalDialog
('modal_dialog.html');"></input>
        <br></br>
<p>Text from Modal:</p>
<input type = "text" name = "modaloutput"></input>
</body>
</html>

modal_dialog.html:

<html>
        <head><title>Modal Dialog</title></head>

                <body>
        <p>Enter some text:</p>
        <input type=text name=modal_text />
        <input type=button value="Close"
onClick="javascript:window.returnValue=modal_text.value; window.close
();"/>
</body></html>

I have to set some text in a text filed on modal dialog box
I used this code:

ie=Watir::IE.attach(:title,'Modal Dialog')
ie.text_field(:name,'modal_text').set("watir")
But it throws an error:

Unable to locate a window with title of Modal Dialog
(Watir::Exception::NoMatchingWindowFoundException)

can anyone help me ,how to attach modal dialog box and perform some
action on its elements.
Thanks


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Watir General" group.
To post to this group, send email to [email protected]
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~----------~----~----~----~------~----~------~--~---

Reply via email to