If it is a HTML modal dialog, unfortunately it wont work. WET has a good
support for javascript popups but currently doesn't support modal dialogs.
Raghu
Neri, Marco wrote:
> Hi ( this is more of a wet than watir issue but I'm hoping someone
> else can help )
>
> I'm using wet (0.5.3) to open a custom confirm delete dialog using :
>
> Browser("title:=Victoria Police -
> Attendance").Link("text:=Delete").click_without_blocking
> puts(Browser("title:=Victoria Police -
> Attendance").Dialog("title:=Confirmation -- Web Page Dialog").to_s)
> Browser("title:=Victoria Police -
> Attendance").Dialog("title:=Confirmation -- Web Page
> Dialog").Button("text:=Yes").click
> #puts(Browser("title:=Victoria Police -
> Attendance").Dialog("title:=Confirmation -- Web Page
> Dialog").Button("text:=Yes").to_s)
>
> The dialog opens but the line to click the yes button times out and an
> exception is thrown. If I comment out out the click and uncomment the
> puts I see that the ModalDialog button function returns nil so It
> cannot find the button.
>
> here's a snippet from the source.
>
> <img src="../Images/ICO_EXCLAMATION.gif">
> <p>Are you sure you want to delete this record?</p>
> <div id="confirmbuttons">
> <button type="submit" runat="server"
> onclick="javascript:OnYesClick();">Yes</button>
> <button type="submit" runat="server"
> onclick="javascript:OnNoClick();">No</button>
> </div>
>
> I'm at a loss as to why.
>
> Marco
>
>
>
>
>
> =======================================================
>
> The information contained in this email and any files attached may
>
> be confidential information to the intended recipient and may be
>
> the subject of legal professional privilege or public interest immunity.
>
>
>
> If you are not the intended recipient, any use, disclosure or copying is
>
> unauthorised.
>
>
>
> If you have received this document in error please telephone 1300 307 082
>
>
>
> *******************************************************************
>
> This footnote also confirms that this email message has been swept
>
> for the presence of computer viruses.
>
> *******************************************************************
>
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Wtr-general mailing list
>[email protected]
>http://rubyforge.org/mailman/listinfo/wtr-general
>
_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general