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

[Wtr-general] how to test e-mail applications

2006-05-30 Thread Zeljko Filipin
As many web applications do, one that I am testing also sends e-mails. Also, it can receive e-mails.I started testing e-mail functionality. I found Net::SMTP (
http://www.ruby-doc.org/stdlib/libdoc/net/smtp/rdoc/index.html) for sending and Net::POP3 (http://www.ruby-doc.org/stdlib/libdoc/net/pop/rdoc/classes/Net/POP3.html
) for receiving. They both work just fine.I also found RubyMail (http://www.lickey.com/rubymail/) and TMail (http://i.loveruby.net/en/projects/tmail/
) that should make my testing easier (parsing e-mails mostly).But...I could not install Tmail because I have problems with C compiler.RubyMail does not recognize body of e-mails I am testing with: 
message.from, message.to and message.subject returns strings that I need, but message.body always returns nil.I will try to contact authors of Tmail and RubyMail. I also started making my own ruby application for sending, receiving and parsing e-mails (my first TDD project!).
I just wanted to ask if somebody has any experience with testing e-mail part of your (mostly web) applications and can suggest some tools? Thanks.Ċ½eljko-- 
http://www.testingreflections.com/blog/3071 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] how to test e-mail applications

2006-05-30 Thread Chris McMahon
 I just wanted to ask if somebody has any experience with testing e-mail part
 of your (mostly web) applications and can suggest some tools? Thanks.

I'll be going down this path very very soon, so please do share what
you find.  I'll do the same.

I'm testing an app that does email, but for the tests I'm writing
right now, I need only find in a database the number of emails sent.

Actually generating and intercepting mail with SMTP and POP is coming
very soon, though.

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


Re: [Wtr-general] how to test e-mail applications

2006-05-30 Thread Bret Pettichord
Zeljko,I also will be needing to automate the verfication that my application sent correct emails. I appreciate your sharing what you find in this area.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] newbie help

2006-05-30 Thread Eric Nachman
Thanks Paul,

It did not work, any other ideas. It like it does not
recognize the execute, or fetch commands..

e
--- Paul Rogers [EMAIL PROTECTED] wrote:

 I think that sth contains the number of rows
 returned fro mthe query
 if you change your second line from
 
 sth.execute(SELECT * FROM DATA).fetch do |row|
 
 
 to 
 
 dbh.execute(SELECT * FROM DATA).fetch do |row|
 
 It might be what you want
 
 Paul
 
 
 - Original Message -
 From: Eric Nachman [EMAIL PROTECTED]
 Date: Monday, May 29, 2006 9:24 am
 Subject: [Wtr-general] newbie help
 
  Ok,
  
  I am trying to do something real simple, but I
 can't
  figure it out. I am trying to run a querry against
 an 
  MsAccess database using ODBC. I am connecting via
  Database but I can't get the querry to run. Any
 ideas?
  
  Below is the error I am getting:
  
  login.rb:25: undefined method `execute' for
 -1:Fixnum
  (NoMethodError)
  
  code is:
  dbh=ODBC::connect('MyData')
  
  sth=dbh.do(SELECT * FROM DATA)
  sth.execute(SELECT * FROM DATA).fetch do |row|
  
  I am sure it something easy. But any help will be
  appreciated.
  
  
  
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around 
  http://mail.yahoo.com 
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
  
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] newbie help

2006-05-30 Thread Paul Rogers
I just realised I misread your original email. It was returning -1, not the 
1 that I saw.

this is some code I have used. It wasnt for access, but that may not matter

connection =  DBI.connect(DBI:ODBC:[EMAIL PROTECTED] , @userName , @password)
a_2d_array = connection.select_all(sql)

the select all returns a 2 d array of the data. Ive also used fetch as well, 
but couldnt find the code for that

Paul



- Original Message - 
From: Eric Nachman [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Tuesday, May 30, 2006 9:30 PM
Subject: Re: [Wtr-general] newbie help


 Thanks Paul,

 It did not work, any other ideas. It like it does not
 recognize the execute, or fetch commands..

 e
 --- Paul Rogers [EMAIL PROTECTED] wrote:

 I think that sth contains the number of rows
 returned fro mthe query
 if you change your second line from

 sth.execute(SELECT * FROM DATA).fetch do |row|


 to

 dbh.execute(SELECT * FROM DATA).fetch do |row|

 It might be what you want

 Paul


 - Original Message -
 From: Eric Nachman [EMAIL PROTECTED]
 Date: Monday, May 29, 2006 9:24 am
 Subject: [Wtr-general] newbie help

  Ok,
 
  I am trying to do something real simple, but I
 can't
  figure it out. I am trying to run a querry against
 an
  MsAccess database using ODBC. I am connecting via
  Database but I can't get the querry to run. Any
 ideas?
 
  Below is the error I am getting:
 
  login.rb:25: undefined method `execute' for
 -1:Fixnum
  (NoMethodError)
 
  code is:
  dbh=ODBC::connect('MyData')
 
  sth=dbh.do(SELECT * FROM DATA)
  sth.execute(SELECT * FROM DATA).fetch do |row|
 
  I am sure it something easy. But any help will be
  appreciated.
 
 
 
  __
  Do You Yahoo!?
  Tired of spam?  Yahoo! Mail has the best spam
 protection around
  http://mail.yahoo.com
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  http://rubyforge.org/mailman/listinfo/wtr-general
 
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general



 __
 Do You Yahoo!?
 Tired of spam?  Yahoo! Mail has the best spam protection around
 http://mail.yahoo.com
 ___
 Wtr-general mailing list
 Wtr-general@rubyforge.org
 http://rubyforge.org/mailman/listinfo/wtr-general 

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