Re: [Wtr-general] 1.5 modal dialog. Syntax of supported tags ?

2006-05-30 Thread Bret Pettichord
On 5/29/06, Neri, Marco [EMAIL PROTECTED] wrote:







Is the issue that the buttons are defined using submit instead of 
input type=button
 value=Close 
- Yes, i think this is the problem.
does this means that the modal dialog support in 1.5 is restricted only to dialogs implemented similar to the example in unit test. The modal dialog support works with any objects that can be found in a regular web page. The problem you are running into just happens to be on a modal dialog. It may happen, however, that these button tags are more popular on modal dialogs, so that is where we are seeing them.
In any case, Watir should support the button tag. Would you mind adding a Jira issue for this as a reminder?Bret
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] 1.5 modal dialog. Syntax of supported tags ?

2006-05-30 Thread David Schmidt
Marco,

Looking at your HTML below I think that the problem is that your button 
is located inside a frame, which is loaded via another URL.  Because of 
that, the element would be in a different Watir container and wouldn't 
be found inside the top level container for that modal dialog.

Assuming that the frame main has the button you want, you should be 
able to click on it by using:

modal.frame('main').button(:text, 'Yes').click

Let me know if that works for you.

David Schmidt

Neri, Marco wrote:

 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
 TITLEConfirmation/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=ConfirmDelete.aspx
 /frameset
 /html

 The src for confirmdelete.aspx:

 div id=ConfirmDelete
 img src=../Images/ICO_EXCLAMATION.gif
 plabel id=MessageLabel runat=server/label/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
 /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


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] 1.5 modal dialog. Syntax of supported tags ?

2006-05-30 Thread Neri, Marco
David

Thanks! You're right.  

Marco 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Schmidt
Sent: Wednesday, 31 May 2006 06:19
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] 1.5 modal dialog. Syntax of supported tags ?

Marco,

Looking at your HTML below I think that the problem is that your button
is located inside a frame, which is loaded via another URL.  Because of
that, the element would be in a different Watir container and wouldn't
be found inside the top level container for that modal dialog.

Assuming that the frame main has the button you want, you should be
able to click on it by using:

modal.frame('main').button(:text, 'Yes').click

Let me know if that works for you.

David Schmidt

Neri, Marco wrote:

 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
 TITLEConfirmation/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=ConfirmDelete.aspx
 /frameset
 /html

 The src for confirmdelete.aspx:

 div id=ConfirmDelete
 img src=../Images/ICO_EXCLAMATION.gif
 plabel id=MessageLabel runat=server/label/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
 /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


___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


===
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
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] 1.5 modal dialog. Syntax of supported tags ?

2006-05-30 Thread Neri, Marco



David / Bret

In reply.

david's suggestion to use 

modal.frame('main').button(:text, 
'Yes').click

was right. Though I 
had to change the src of the dialog to use button 
type="button".type="submit" dosen't work. error 
trace:

 1) 
Error:test802(TC_test802):NoMethodError: undefined method `all' for 
nil:NilClass 
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1017/./watir.rb:992:in 
`ole_inner_elements' 
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1017/./watir.rb:1041:in 
`locate_input_element' 
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1017/./watir.rb:3458:in 
`locate' 
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1017/./watir.rb:2235:in 
`assert_exists' 
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:45:in 
`test802'

1 tests, 0 assertions, 0 failures, 1 
errors

I added an issue for this on thethe 
Jira.

thanks for your help

Marco





From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf Of Bret 
PettichordSent: Tuesday, 30 May 2006 16:27To: 
wtr-general@rubyforge.orgSubject: Re: [Wtr-general] 1.5 modal dialog. 
Syntax of supported tags ?
On 5/29/06, Neri, Marco [EMAIL PROTECTED] 
wrote:


  
  
  Is the issue that the buttons are defined 
  using submit instead of  
  input type=button value="Close" - 
Yes, i think this is the problem.

  
  
  does this means that the modal dialog 
  support in 1.5 is restricted only to dialogs implemented similar to the 
  example in unit test. 
The modal dialog support works with any objects that can be found in a 
regular web page. The problem you are running into just happens to be on a modal 
dialog. It may happen, however, that these button tags are more popular 
on modal dialogs, so that is where we are seeing them. In any case, 
Watir should support the button tag. Would you mind adding a Jira issue 
for this as a reminder?Bret

===
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
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] 1.5 modal dialog. Syntax of supported tags ?

2006-05-29 Thread Neri, Marco
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

  TITLEConfirmation/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="">

 plabel 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
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general