Title: Re: 1.5 modal dialog. Syntax of supported tags ?

Hi

I'm running v1.5.1.1017. I need some help re modal dialog.

I'm using this code to access a modal dialog:

@ie.link(:text, "Delete").click_no_wait
modal = @ie.modal_dialog(:title, 'Confirmation')
puts(modal.to_s)
modal.button(:text, 'Yes').click

In the console the puts shows #<Watir::ModalDialog:0x27c0970>. Based on this I assume it has found the dialog using the title because no error is thrown. I'm not 100% sure though. I had a look in the src for ModalDialog.rb but cannot see a method that I could use to to get a list of all elements in the dialog.

The button click is not working the console shows the error:

  1) Error:
test802(TC_test802):
Watir::Exception::UnknownObjectException: Unable to locate object, using text an
d Yes
    c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1017/./watir.rb:2237:in `assert_e
xists'
    c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1017/./watir.rb:2378:in `click'
    C:/visual studio projects/VictoriaPolice/AttendanceTests/bug802.rb:61:in `te
st802'

I have the same issue if I use value and insert a value="Yes" into the src for the dialog. I also tried using :index


The src for the dialog:

<html>
        <head>
                <TITLE>Confirmation</TITLE>
                <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
                <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema">
        </head>
        <frameset border="0" rows="0,100%" frameSpacing="0" frameBorder="0">
                <frame name="header" src="" scrolling="no" noresize>
                <frame name="main" src="">
        </frameset>
</html>

The src for confirmdelete.aspx:

<div id="ConfirmDelete">
        <img src="">
        <p><label id="MessageLabel" runat="server"></label></p>
        <div id="confirmbuttons">
                <button type="submit" runat="server" >
                <button type="submit" runat="server" >
        </div>
</div>

Is the issue that the buttons are defined using submit instead of <input type=button value="Close" - does this means that the modal dialog support in 1.5 is restricted only to dialogs implemented similar to the example in unit test. ?

Any suggestions? thanks

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

Reply via email to