Hi,

Thanks for the information/URL but I am still unable to move ahead with the 
modal dialogs.

What I have tried so far is:

Method I:

Used all the methods in the watir.rb file for Class ModalDialog but they don't 
seem to work with Ruby ver 1.8.6 or 1.8.5 for that matter.
So I had Ruby 1.8.2 installed in another machine but that doesn't seem to 
support "click_no_wait".

mod= ModalDialog.new
mod.find_modal_from_window



Method II :

Tried using the modal dialog example from the Wiki page

 modal = ie.modal_dialog(:title,'Modal Dialog - Webpage Dialog')
 puts modal.title()
 modal.wait
 puts modal.button(:index,1)



Method III :

Tried finding the connect_unknown method in Win32Ole.

We encounter NoMethodError for connect_unknown in the locate method for the 
class ModalDialog. However win32ole doesn't have any method by such name.The 
method present is connect which takes argument as either OLE program id or 
class id or moniker.


Method IV :

Winclicker

Tried using the winclicker class of watir to handle the modal dialog.

w=WinClicker.new
q1=w.getWindowHandle(/Webpage Dialog/)
puts q1                                               (This returns to me the 
hwnD for the modal dialog box)
puts w.getWindowTitle(q1)                      (This returns to me the title of 
the modal dialog window)

However if we try to use :
w.clickWindowsButton_hwnd(q1,'Run')                 (Run is the caption of the 
button that I need to click)

The system returns me FALSE so even though we have control of the modal dialog 
we still don't have the access right to the window.


Also it seems to me that as we have moved ahead with newer versions of Ruby and 
Watir we seemed to have gone backwards with respect to pop-ups (modal or 
non-modal)

So can you guys please look into it so that we can get going with not just  
this but with other such problems in Watir

________________________________
From: [email protected] [mailto:[email protected]] On 
Behalf Of Željko Filipin
Sent: Monday, February 08, 2010 6:07 PM
To: [email protected]
Subject: Re: [wtr-general] Help with Modal Dialog boxes !!!!

On Mon, Feb 8, 2010 at 7:03 AM, Rohan Ojha 
<[email protected]<mailto:[email protected]>> wrote:
> Has anybody come across some method with which we can work on a modal dialog 
> window.

Thanks for the screen shot, it always helps.

Did you read this?

http://wiki.openqa.org/display/WTR/Pop+Ups
http://wiki.openqa.org/display/WTR/Modal+Dialogs
http://wiki.openqa.org/display/WTR/New+Browser+Windows

Željko
--
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

-- 
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