[Wtr-general] How to get report message after running every test case

2007-03-27 Thread Jason He
Dear all,

 

I write some the filename of test cases in a windows bat file, execute
the bat file, and then report messages for each test case will output in
the console.

Now, in order to make statistics for these messages, could they also
output to the log file by script? 

 

 

The following is the report message after running one test case




Finished in 15.063 seconds.

 

  1) Failure:

test_b(TC_rt_r_login) [C:/watir1145/runtime/rt_r_login.rb:34]:

false is not true.

 

5 tests, 4 assertions, 1 failures, 0 errors




 

Regards,

Jason

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

[Wtr-general] Water 1.5.1

2007-03-27 Thread krk
Right now i am working on version 1.4.1, Is watir version 1.5.1 is available 
for download.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Water 1.5.1

2007-03-27 Thread Naga Harish Kanegolla
Yes, Its available, u can download the gem from this page, 
http://wiki.openqa.org/display/WTR/Development+Builds
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Water 1.5.1

2007-03-27 Thread rkkanneganti
Thanks for the Quick response Nagaharish.
One for question should we directly download the Gem and install it or should 
we follow the steps given to install the 1.5.1 Gem. I already have 1.4.1 watir 
installed in my machine.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Water 1.5.1

2007-03-27 Thread Naga Harish Kanegolla
I hope its better to follow the steps,
 If u are using watir one click installer then u can uninstall directly. If u 
installed watir with the gem then uninstall ruby, and install ruby and watir1.5
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Watir 1.5..1..1158 installation

2007-03-27 Thread Simba
I have download Development version of Watir( Watir-bonus-1.5.1.1158 )
But when i give gem install Watir in CMD prompt ,its Installing Watir.1.4.1 
instead of watir 1.5.1.1158 [It says successfully installed watir 1.4.1].Any 
body knows reason for this.

Procedure i have used for Installation
1.Uninstall Ruby 
2. Uninsall Watir 1.4.1
3.Install Ruby
4.Went to the Downloaded Folder in CMD
5.Typed Gem install Watir
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir 1.5..1..1158 installation

2007-03-27 Thread Angrez Singh

Hi,

Why you have uninstalled Ruby? Any reasons.

Regards,
Angrez

On 3/27/07, Simba [EMAIL PROTECTED] wrote:


I have download Development version of Watir( Watir-bonus-1.5.1.1158 )
But when i give gem install Watir in CMD prompt ,its Installing
Watir.1.4.1 instead of watir 1.5.1.1158 [It says successfully installed
watir 1.4.1].Any body knows reason for this.

Procedure i have used for Installation
1.Uninstall Ruby
2. Uninsall Watir 1.4.1
3.Install Ruby
4.Went to the Downloaded Folder in CMD
5.Typed Gem install Watir
___
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

Re: [Wtr-general] Water 1.5.1

2007-03-27 Thread rkkanneganti
hi nagaharish  

first i uninstalled watir 1.4 and ruby and later reinstalled ruby and 
downloaded the latest ver of watir gem and thru command window installed the 
watir as per the steps given below..

Is Watir 1.4.1 installed? If you have already installed Watir 1.4 using the 
one-click installer, you must first uninstall it. (Or just uninstall Ruby.) The 
1.4.1 gem, however, can coexist with 1.5 gems no problem. 
Install Ruby. 
Download the gem. 
Open a command window. 
cd to the directory where you downloaded the gem. 
type gem install watir 

but i don't see any watir command option in the start -programs-watir.  How 
can we execute the file (in which code is written) which is on the desktop(or 
any other folder) directly. 

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


Re: [Wtr-general] Unable to select the button from button-menu

2007-03-27 Thread rkkanneganti
Does the above said mail.yahoo.com case is working properly ie..Does Mark as 
Read is getting clicking.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Unable to select the button from button-menu

2007-03-27 Thread Mathew Jacob
Not able to select the button in button-menu. Still I am searching for the
solution

 

Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of rkkanneganti
Sent: Tuesday, March 27, 2007 6:32 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

Does the above said mail.yahoo.com case is working properly ie..Does Mark as
Read is getting clicking.
___
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


Re: [Wtr-general] Water 1.5.1

2007-03-27 Thread Naga Harish Kanegolla
wen u did gem install watir  did it gave the statement that Watir is 
successfully installed ?? 
If u get that message then ur watir is successfully installed , u can check 
that watir in the ruby gems folder like 
C:\ruby\lib\ruby\gems\1.8\gems  u can check watir 1.5 folder in that folder, 
and try to run  the test case, it will run successsfully
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Scheduler

2007-03-27 Thread Naga Harish Kanegolla
Is there a way to run the test cases at scheduled time like i want to run all 
my test cases at morning 6'o clock, So how can i do that?? 

Thanks in Advance,
Harish
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Water 1.5.1

2007-03-27 Thread rkkanneganti
Thank Q Nagaharish

everything is working fine now. Thanks again for prompt replies. :)
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Scheduler

2007-03-27 Thread Richard Conroy
On 3/27/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:
 Is there a way to run the test cases at scheduled time like i want to run all 
 my test cases at morning 6'o clock, So how can i do that??

Create a windows batch file that invokes your tests (however they are
structured).
Then go into Control Panel | Scheduled Tasks and define a task that invokes on
your windows batch file.

You could possibly call the Ruby file directly.

Alternatively investigate if you have any interesting scheduling
capability built into
your continuous integration server.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Unable to select the button from button-menu

2007-03-27 Thread Angrez Singh

Hi Mathew,

The above code works on my machine. It certainly marks the message as read
or unread.

Can you try the code and let me know what happens?

- Angrez
'PS: It has not been tested against Yahoo beta mail.


On 3/27/07, Mathew Jacob [EMAIL PROTECTED] wrote:


Not able to select the button in button-menu. Still I am searching for the
solution



Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of rkkanneganti
Sent: Tuesday, March 27, 2007 6:32 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

Does the above said mail.yahoo.com case is working properly ie..Does Mark
as
Read is getting clicking.
___
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

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

Re: [Wtr-general] Unable to select the button from button-menu

2007-03-27 Thread Mathew Jacob
Hi Angrez,

 

 I have tried that code.  There is some issue in Watir 1.4 and
Watir 1.5. If I uninstall 1.4 and install 1.5 ,Watir script is not detecting
'Inbox' link and not able to open 'Inbox' folder. But if I am not
uninstalling 1.4 and install Watir 1.5 then  run the script it is detecting
Inbox link and opening 'Inbox' folder. But in this case it is not detecting
Button on Button-menu. Any solution for this scenario

 

Regards,

 

Mathew

 

 

 

 

 


Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Angrez Singh
Sent: Tuesday, March 27, 2007 7:08 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

 

Hi Mathew,

The above code works on my machine. It certainly marks the message as read
or unread.

Can you try the code and let me know what happens?

- Angrez
'PS: It has not been tested against Yahoo beta mail. 



On 3/27/07, Mathew Jacob [EMAIL PROTECTED] wrote:

Not able to select the button in button-menu. Still I am searching for the
solution



Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of rkkanneganti
Sent: Tuesday, March 27, 2007 6:32 PM 
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

Does the above said mail.yahoo.com  http://mail.yahoo.com case is working
properly ie..Does Mark as
Read is getting clicking.
___
Wtr-general mailing list
Wtr-general@rubyforge.org  mailto: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

 

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

Re: [Wtr-general] Unable to select the button from button-menu

2007-03-27 Thread Angrez Singh

Hi Mathew,

The code written in watir 1.4.1 should work with watir 1.5. You install the
latest gem and try the code there. Let me know what problems you face while
selecting the inbox link.

Regards,
Angrez

On 3/27/07, Mathew Jacob [EMAIL PROTECTED] wrote:


 Hi Angrez,



 I have tried that code.  There is some issue in Watir 1.4 and
Watir 1.5. If I uninstall 1.4 and install 1.5 ,Watir script is not
detecting 'Inbox' link and not able to open 'Inbox' folder. But if I am not
uninstalling 1.4 and install Watir 1.5 then  run the script it is
detecting Inbox link and opening 'Inbox' folder. But in this case it is not
detecting Button on Button-menu. Any solution for this scenario



Regards,



Mathew









* *


*Ya**ho**o India, EGL, Bangalore – 71, Phone:+91-80-30516346,
Mobile:+91-9945849925*
  --

*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Angrez Singh
*Sent:* Tuesday, March 27, 2007 7:08 PM
*To:* wtr-general@rubyforge.org
*Subject:* Re: [Wtr-general] Unable to select the button from button-menu



Hi Mathew,

The above code works on my machine. It certainly marks the message as read
or unread.

Can you try the code and let me know what happens?

- Angrez
'PS: It has not been tested against Yahoo beta mail.

 On 3/27/07, *Mathew Jacob* [EMAIL PROTECTED] wrote:

Not able to select the button in button-menu. Still I am searching for the
solution



Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of rkkanneganti
Sent: Tuesday, March 27, 2007 6:32 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

Does the above said mail.yahoo.com case is working properly ie..Does Mark
as
Read is getting clicking.
___
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



___
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

Re: [Wtr-general] Scheduler

2007-03-27 Thread Adam Reed
Along with the batch file idea, you can also schedule ruby.exe to run in
Windows and then use command line args to pick which scripts run.

Adam 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Richard Conroy
Sent: Tuesday, March 27, 2007 8:21 AM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Scheduler

On 3/27/07, Naga Harish Kanegolla [EMAIL PROTECTED] wrote:
 Is there a way to run the test cases at scheduled time like i want to
run all my test cases at morning 6'o clock, So how can i do that??

Create a windows batch file that invokes your tests (however they are
structured).
Then go into Control Panel | Scheduled Tasks and define a task that
invokes on your windows batch file.

You could possibly call the Ruby file directly.

Alternatively investigate if you have any interesting scheduling
capability built into your continuous integration server.
___
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


Re: [Wtr-general] Watir 1.5..1..1158 installation

2007-03-27 Thread Charley Baker

Possibly you have the Watir 1.4.1 gem in that folder? Try gem install
watir-1.5.1.1158.gem

-Charley

On 3/27/07, Angrez Singh [EMAIL PROTECTED] wrote:


Hi,

Why you have uninstalled Ruby? Any reasons.

Regards,
Angrez

On 3/27/07, Simba [EMAIL PROTECTED]  wrote:

 I have download Development version of Watir( Watir-bonus-1.5.1.1158 )
 But when i give gem install Watir in CMD prompt ,its Installing
 Watir.1.4.1 instead of watir 1.5.1.1158 [It says successfully installed
 watir 1.4.1].Any body knows reason for this.

 Procedure i have used for Installation
 1.Uninstall Ruby
 2. Uninsall Watir 1.4.1
 3.Install Ruby
 4.Went to the Downloaded Folder in CMD
 5.Typed Gem install Watir
 ___
 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

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

Re: [Wtr-general] Unable to select the button from button-menu

2007-03-27 Thread Mathew Jacob
I am getting the following error. 

 

:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in
`method_missing': document (WIN32OLERuntimeError)

OLE error code:80070005 in Unknown

  Access is denied.

 

HRESULT error code:0x80020009

  Exception occurred. from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in `wait'

from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in `wait'

from
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2577:in `click'

from ./MongoFnDef.rb:39:in `login'

from C:/ruby/samples/RubySrc-1.8.4/sample/MongoMain.rb:23

 

Please look into this

 

Regards,

 

Mathew

 

 

 


Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925

  _  

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Angrez Singh
Sent: Tuesday, March 27, 2007 7:33 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

 

Hi Mathew,

The code written in watir 1.4.1 should work with watir 1.5. You install the
latest gem and try the code there. Let me know what problems you face while
selecting the inbox link. 

Regards,
Angrez 

On 3/27/07, Mathew Jacob [EMAIL PROTECTED] wrote:

Hi Angrez,

 

 I have tried that code.  There is some issue in Watir 1.4 and
Watir 1.5. If I uninstall 1.4 and install 1.5 ,Watir script is not detecting
'Inbox' link and not able to open 'Inbox' folder. But if I am not
uninstalling 1.4 and install Watir 1.5 then  run the script it is detecting
Inbox link and opening 'Inbox' folder. But in this case it is not detecting
Button on Button-menu. Any solution for this scenario

 

Regards,

 

Mathew

 

 

 

 

 


Ya hoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925

  _  

From: [EMAIL PROTECTED] [mailto:
mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] On Behalf Of Angrez Singh
Sent: Tuesday, March 27, 2007 7:08 PM


To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

 

Hi Mathew,

The above code works on my machine. It certainly marks the message as read
or unread.

Can you try the code and let me know what happens?

- Angrez
'PS: It has not been tested against Yahoo beta mail. 

On 3/27/07, Mathew Jacob [EMAIL PROTECTED] wrote:

Not able to select the button in button-menu. Still I am searching for the
solution



Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of rkkanneganti
Sent: Tuesday, March 27, 2007 6:32 PM 
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

Does the above said mail.yahoo.com case is working properly ie..Does Mark as
Read is getting clicking.
___
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

 


___
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

Re: [Wtr-general] How to get report message after running every test case

2007-03-27 Thread Charley Baker

You can redirect the output of your bat file to a file:
mybat.bat  results.txt

-Charley

On 3/27/07, Jason He [EMAIL PROTECTED] wrote:


 Dear all,



I write some the filename of test cases in a windows bat file, execute the
bat file, and then report messages for each test case will output in the
console.

Now, in order to make statistics for these messages, could they also
output to the log file by script?





The following is the report message after running one test case




Finished in 15.063 seconds.



  1) Failure:

test_b(TC_rt_r_login) [C:/watir1145/runtime/rt_r_login.rb:34]:

false is not true.



5 tests, 4 assertions, 1 failures, 0 errors






Regards,

Jason

___
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

[Wtr-general] little framework

2007-03-27 Thread aidy lewis
Hi,

Could anyone give me some feedback on this?

Each HTML objects exists in a module

snip


module Field

MAP_FIELD = Hash.new {|h,k| k}.update(
  'username' = 'login', # gui name = HTML name
  'password' =  'password'
)

  def Field.set(name,args)
$ie.text_field(:name, MAP_FIELD[name]).set(args)
  end

  def Field.assert(name,args)
puts $ie.text_field(:name, MAP_FIELD[name]).verify_contains(args)
  end
end

snip

At the top of each module is a hash map that acts as an object map for
each object.The gui name is mapped to the object name

snip

 MAP_BUTTON = Hash.new {|h| k}.update(
  'login' = 'Login'
 )

snip

IE methods go here

snip

module Explorer
  def Explorer.start(url)
$ie = IE.new
@url=url
$ie.goto(@url)
  end

  def Explorer.close
$ie.close
  end
end

snip

Each test will be in a class

snip

class TestClass

  def test_1

Explorer.start 'http://aidy_server.com/'
Field.set  'username', 'aidy'
Field.assert 'username', 'aidy'
Field.set 'password', 'password123'
A_Button.press 'login'
Explorer.close

  end

end

TestClass.new.test_1
snip

Not so sure about logging, but will probably write to XML

Any opinions?

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


Re: [Wtr-general] little framework

2007-03-27 Thread Paul Rogers

Ive been working on some things that ( at least to my mind) simplify how the 
code represents an html page. It also has several other advantages. I'll 
probably publish it in a seperate library ( or via the contrib dir )

as for your code, the firsat think i would do is get rid of the global ie. even 
replacing it with a method is better

$ie = Watir::IE.new

def my_browser
$ie
end

my_browser.goto('http://someurl')


at least this way its a bit easier to switch to firefox, or do something 
different with the browser.


Paul


- Original Message -
From: aidy lewis [EMAIL PROTECTED]
Date: Tuesday, March 27, 2007 9:56 am
Subject: [Wtr-general] little framework

 Hi,
 
 Could anyone give me some feedback on this?
 
 Each HTML objects exists in a module
 
 snip
 
 
 module Field
 
MAP_FIELD = Hash.new {|h,k| k}.update(
  'username' = 'login', # gui name = HTML name
  'password' =  'password'
)
 
  def Field.set(name,args)
$ie.text_field(:name, MAP_FIELD[name]).set(args)
  end
 
  def Field.assert(name,args)
puts $ie.text_field(:name, MAP_FIELD[name]).verify_contains(args)
  end
 end
 
 snip
 
 At the top of each module is a hash map that acts as an object map for
 each object.The gui name is mapped to the object name
 
 snip
 
 MAP_BUTTON = Hash.new {|h| k}.update(
  'login' = 'Login'
 )
 
 snip
 
 IE methods go here
 
 snip
 
 module Explorer
  def Explorer.start(url)
$ie = IE.new
@url=url
$ie.goto(@url)
  end
 
  def Explorer.close
$ie.close
  end
 end
 
 snip
 
 Each test will be in a class
 
 snip
 
 class TestClass
 
  def test_1
 
Explorer.start 'http://aidy_server.com/'
Field.set  'username', 'aidy'
Field.assert 'username', 'aidy'
Field.set 'password', 'password123'
A_Button.press 'login'
Explorer.close
 
  end
 
 end
 
 TestClass.new.test_1
 snip
 
 Not so sure about logging, but will probably write to XML
 
 Any opinions?
 
 aidy
 ___
 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


Re: [Wtr-general] little framework

2007-03-27 Thread aidy lewis
paul
could you give us a little taster of your efforts?
aidy


On 27/03/07, Paul Rogers [EMAIL PROTECTED] wrote:

 Ive been working on some things that ( at least to my mind) simplify how the
 code represents an html page. It also has several other advantages. I'll
 probably publish it in a seperate library ( or via the contrib dir )

 as for your code, the firsat think i would do is get rid of the global ie.
 even replacing it with a method is better

 $ie = Watir::IE.new

 def my_browser
 $ie
 end

 my_browser.goto('http://someurl')


 at least this way its a bit easier to switch to firefox, or do something
 different with the browser.


 Paul


 - Original Message -
 From: aidy lewis [EMAIL PROTECTED]
 Date: Tuesday, March 27, 2007 9:56 am
 Subject: [Wtr-general] little framework

  Hi,
 
  Could anyone give me some feedback on this?
 
  Each HTML objects exists in a module
 
  snip
 
 
  module Field
 
 MAP_FIELD = Hash.new {|h,k| k}.update(
   'username' = 'login', # gui name = HTML name
   'password' =  'password'
 )
 
   def Field.set(name,args)
 $ie.text_field(:name, MAP_FIELD[name]).set(args)
   end
 
   def Field.assert(name,args)
 puts $ie.text_field(:name, MAP_FIELD[name]).verify_contains(args)
   end
  end
 
  snip
 
  At the top of each module is a hash map that acts as an object map for
  each object.The gui name is mapped to the object name
 
  snip
 
  MAP_BUTTON = Hash.new {|h| k}.update(
   'login' = 'Login'
  )
 
  snip
 
  IE methods go here
 
  snip
 
  module Explorer
   def Explorer.start(url)
 $ie = IE.new
 @url=url
 $ie.goto(@url)
   end
 
   def Explorer.close
 $ie.close
   end
  end
 
  snip
 
  Each test will be in a class
 
  snip
 
  class TestClass
 
   def test_1
 
 Explorer.start 'http://aidy_server.com/'
 Field.set  'username', 'aidy'
 Field.assert 'username', 'aidy'
 Field.set 'password', 'password123'
 A_Button.press 'login'
 Explorer.close
 
   end
 
  end
 
  TestClass.new.test_1
  snip
 
  Not so sure about logging, but will probably write to XML
 
  Any opinions?
 
  aidy
  ___
  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

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


Re: [Wtr-general] little framework

2007-03-27 Thread Paul Rogers
the idea is that each page in the app that Im testing has a corresponding class 
n my test code.
the class would look something like this:


class MyLoginPage  SomeParentClass

text_field :user_name ,  :id='username'
text_field :pass_word,   :id ='password'
button :login_button , :value = 'Login Now'
 
title Welcome To MyApp
url /login.jsp/

def has_loaded
raise Not loaded unless user_name.exists?
end

def do( un , pw )

user_name.set( un )
pass_word.set( pw )
login_button.click

NextPage.has_loaded 

end


end


the ParentClass would have methods to validate that everything is there, the 
title is correct etc. It also has the code to do the translation of the 
descrptive  name ( eg login_button) to the actual element ( button(:value , 
'Login Now!')


I also have some code that generates this class from  the page, so in irb you 
would do something like this

ie.goto( 'http://server/login.jsp')
ie.gen = saves the class to a file using the title

which then saves the class above.

Bob Cotton from Rally has doe some similar type things, as has Elizabeth 
Hendrickson. Another guy I have worked with also came up with something 
similar, which makes me think this is sort of okay.

Ive also been using something like this for model based testing, which really 
is kind of neat.

Paul



- Original Message -
From: aidy lewis [EMAIL PROTECTED]
Date: Tuesday, March 27, 2007 11:10 am
Subject: Re: [Wtr-general] little framework

 paul
 could you give us a little taster of your efforts?
 aidy
 
 
 On 27/03/07, Paul Rogers [EMAIL PROTECTED] wrote:
 
  Ive been working on some things that ( at least to my mind) 
 simplify how the
  code represents an html page. It also has several other 
 advantages. I'll
  probably publish it in a seperate library ( or via the contrib 
 dir )
 
  as for your code, the firsat think i would do is get rid of the 
 global ie.
  even replacing it with a method is better
 
  $ie = Watir::IE.new
 
  def my_browser
  $ie
  end
 
  my_browser.goto('http://someurl')
 
 
  at least this way its a bit easier to switch to firefox, or do 
 something different with the browser.
 
 
  Paul
 
 
  - Original Message -
  From: aidy lewis [EMAIL PROTECTED]
  Date: Tuesday, March 27, 2007 9:56 am
  Subject: [Wtr-general] little framework
 
   Hi,
  
   Could anyone give me some feedback on this?
  
   Each HTML objects exists in a module
  
   snip
  
  
   module Field
  
  MAP_FIELD = Hash.new {|h,k| k}.update(
'username' = 'login', # gui name = HTML name
'password' =  'password'
  )
  
def Field.set(name,args)
  $ie.text_field(:name, MAP_FIELD[name]).set(args)
end
  
def Field.assert(name,args)
  puts $ie.text_field(:name, 
 MAP_FIELD[name]).verify_contains(args)   end
   end
  
   snip
  
   At the top of each module is a hash map that acts as an object 
 map for
   each object.The gui name is mapped to the object name
  
   snip
  
   MAP_BUTTON = Hash.new {|h| k}.update(
'login' = 'Login'
   )
  
   snip
  
   IE methods go here
  
   snip
  
   module Explorer
def Explorer.start(url)
  $ie = IE.new
  @url=url
  $ie.goto(@url)
end
  
def Explorer.close
  $ie.close
end
   end
  
   snip
  
   Each test will be in a class
  
   snip
  
   class TestClass
  
def test_1
  
  Explorer.start 'http://aidy_server.com/'
  Field.set  'username', 'aidy'
  Field.assert 'username', 'aidy'
  Field.set 'password', 'password123'
  A_Button.press 'login'
  Explorer.close
  
end
  
   end
  
   TestClass.new.test_1
   snip
  
   Not so sure about logging, but will probably write to XML
  
   Any opinions?
  
   aidy
   ___
   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
 
 ___
 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


Re: [Wtr-general] little framework

2007-03-27 Thread Paul Rogers

yep. My original motivation was to improve the speed  of code development and 
also make it clearer what was going on.

I did this and then realised I had almost had an mbt library. With some extra 
work I got it to work just fine.

MBT on web apps have some problems, as the 'state' is not just what pahe you 
are on, but also what state the ( for exampe ) user is in. EG on a web banking 
app,  the user may be on the 'pay my visa bill' page, but if there is no 
balance on the visa, the 'Pay Now' link may be disabled.

Paul

- Original Message -
From: Chris McMahon [EMAIL PROTECTED]
Date: Tuesday, March 27, 2007 12:07 pm
Subject: Re: [Wtr-general] little framework

  Ive also been using something like this for model based testing, 
 which really is kind of neat.
 
 I was going to say, you could make a state machine for
 MBT/robot-army-testing out of this fairly easily, eh?
 -C
 ___
 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


Re: [Wtr-general] Problems accessing modal_dialog from ruby v. 1.8.5

2007-03-27 Thread minal
I need ruby 1.8.5 and I also need modal_dialog support in watir which is only 
supported with ruby 1.8.2. I would like to have watir modal dialog support with 
ruby 1.8.5 (or later versions). 

Is there any jira ticket open on this, where I can vote?

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


[Wtr-general] flash

2007-03-27 Thread Paul Rogers
not related to watir, but I received an email about this today
http://osflash.org/autotestflash

its a way of testing flash apps. I know nothing about it, except the link, so 
no questions please ;-)
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Watir 1.5..1..1158 installation

2007-03-27 Thread matt
You must have the watir gem file for 1158 (watir-1.5.1-1158.gem) in the current 
working directory.  Then you can execute 'gem install watir'.

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


Re: [Wtr-general] little framework

2007-03-27 Thread aidy lewis
Paul Rogers says

 the ParentClass would have methods to validate that everything is there, the 
 title  is correct etc. It also has the code to do the translation of the 
 descrptive  name (  eg login_button) to the actual element ( button(:value , 
 'Login Now!')

Very good idea. I have been struggling with the concept of making
automated acceptance tests OO. What could I do? Have a Login class
with a constructor containing ie.goto(url) - and extend that??

 class MyLoginPage  SomeParentClass

would you ever extend MyLoginPage or add additional methods to that
class as needs occurr?

Where do modules come into this framework?

 Bob Cotton from Rally has doe some similar type things, as has Elizabeth
 Hendrickson. Another guy I have worked with also came up with something
 similar, which makes me think this is sort of okay.

yes, there are some people who you can more or less have complete
faith in; but not many.


 Ive also been using something like this for model based testing, which really 
 is
 kind of neat.

I know nothing of this. Maybe off-topic. Would you consider this agile?

Would you mind me looking into these ideas, and if I tag your name on
- blogging them or adding them to the wiki or something?

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


Re: [Wtr-general] watir execution from webserver

2007-03-27 Thread eisdrache
I am so glad that you followed what I was trying to say. I was having a bit of 
difficulting attempting to explain my situation and was afraid I wouldn't 
receive much help due to misunderstanding of the question.

I actually thought about the gserver route, but now that you mention the idea 
of using rails my attention has been perked. I have done a tiny bit of work 
with rails, but my overall knowledge of the framework is limited. I am highly 
interested in learning and am actually in the process of doing so.

Anyway, if you could please elaborate and supply the code that you previously 
mentioned I would truly appreciate it.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] watir execution from webserver

2007-03-27 Thread Bret Pettichord
eisdrache wrote:
 I actually thought about the gserver route, but now that you mention the idea 
 of using rails my attention has been perked. I have done a tiny bit of work 
 with rails, but my overall knowledge of the framework is limited. I am highly 
 interested in learning and am actually in the process of doing so.
   
I ran into the same problem when trying to run watir scripts under 
cruisecontrol.net. There is a much simpler solution than has been suggested.

Instead of running the server process as a service, run it as a user 
program.

That's it. That means that you will have to log in as a user (probably 
admin) and then have the server run as a startup program (instead of a 
service). And you'll have to stay logged in, so you will need a 
dedicated head (monitor), but you can lock it, if you have security 
concerns.

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


Re: [Wtr-general] Question about wait_until(n) {element.exists?}

2007-03-27 Thread Bret Pettichord
John Lolis wrote:
 waitr 1136

 Lets say I have the following action i want to perform

 $ie.frame('Frame').table(:id,'ID).table(:index,1)[1][2].click

 But, the this is frame heavy page, and wait sometimes doesn't play nice, so I 
 decide to do

 element = $ie.frame('Frame').table(:id,'ID).table(:index,1)
 wait_until(30) { element.exists? }
 element[1][2].click

 In my mind the above says, keep looking for element until it exists, if it 
 doesn't fail. What happens though is .exists? throws an exception when it 
 can't find the element making the whole thing not work.
   
 It seems that exists should never throw an exception, it should always be 
 true or false. Yes its there or no its not.

 In watir.rb I think this is the offending code
 # Returns whether this element actually exists.
 def exists?
   begin
 locate if defined?(locate)
  rescue WIN32OLERuntimeError
 @o = nil
   end
   @o ? true: false
 end
 alias :exist? :exists?

 The rescue doesn't seem to be broad enough. Lower down the stack trace i 
 notice that asset_exists is doing the following

 unless ole_object
 raise UnknownObjectException.new(Unable to locate object, using [EMAIL 
 PROTECTED] and [EMAIL PROTECTED])
 end

 which exists can't handle. If in exists i make the rescue a 'catch all' 
 everything works like a champ (but i'm not sure what effects that has on the 
 system).

 Hope that made sense.
   
Excellent report and analysis. I think I agree that this is a bug and 
that it needs to be fixed along the lines that you suggest.

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


Re: [Wtr-general] watir execution from webserver

2007-03-27 Thread eisdrache
interesting idea...i definitely didnt think of that one. i will give it a shot 
and see what happens. thank you for you help.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] watir execution from webserver

2007-03-27 Thread eisdrache
THAT WORKED PERFECTLY

thank you so very much!

the rails solution still interests me, so bill, if you are reading this i would 
still like to see that code that you mentioned.

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


Re: [Wtr-general] Watir / Ruby / Mysql

2007-03-27 Thread Paul Hammer

Hi Paul,

I really appreciate your help here.  I hope you have a moment for 1 more 
question.

I've tried these steps, and I got this error when responding to the 
question:

  How should SQL server verify the authenticity of the login ID.

Connection failed:
SQLState: '01000'
sql Server Error: 14
[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen 
(ParseConnectParams()).
Connection failed:
SQLState: '08001'
sql Server Error: 14
[Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.

Any suggestions?

Paul


From: Paul Rogers [EMAIL PROTECTED]
Reply-To: wtr-general@rubyforge.org
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Watir / Ruby / Mysql
Date: Fri, 23 Mar 2007 21:14:05 -0600

you need to create a dsn
goto control panel,
administrative tools
Data sources
click the system dsn
then add
and add stuff for your db, host etc

then you can use odbc from DBI, something like this
dbh=DBI::ODBC::my_DSN.connect

Paul


- Original Message -
From: Paul Hammer [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Friday, March 23, 2007 4:32 PM
Subject: Re: [Wtr-general] Watir / Ruby / Mysql


 
  Paul,
 
  I'm making progress.  I downloaded the mysql ODBC driver to my machine,
  and
  run the setup.exe.  This seems to have run fine.
 
  Now, how is ruby setup to know about the driver, and how do I configure
  the
  driver to know about the mysql on the machine?  I've dug around on the
  mysql
  site for documents on this, but haven't found anything.
 
  thanks,
 
  Paul Hammer
 
 
 From: Paul Rogers [EMAIL PROTECTED]
 Reply-To: wtr-general@rubyforge.org
 To: wtr-general@rubyforge.org
 Subject: Re: [Wtr-general] Watir / Ruby / Mysql
 Date: Fri, 23 Mar 2007 13:52:58 -0600
 
 Ive never installed like that. Ive always used the mysql odbc driver and
 used that
 
 http://dev.mysql.com/downloads/connector/odbc/3.51.html
 
 - Original Message -
 From: Paul Hammer [EMAIL PROTECTED]
 To: wtr-general@rubyforge.org
 Sent: Friday, March 23, 2007 11:25 AM
 Subject: Re: [Wtr-general] Watir / Ruby / Mysql
 
 
  
   Adam  Paul,
  
   Thanks for responding.  I was just reading the prerequisites section
   for
   the
   Ruby DBI, and it says:
  
   ...you'll need to have both the Ruby MySQL module and the C API
   installed.
  
   Can you tell me where I can find these packages?
  
   Paul
  
  
  From: Paul Rogers [EMAIL PROTECTED]
  Reply-To: wtr-general@rubyforge.org
  To: wtr-general@rubyforge.org
  Subject: Re: [Wtr-general] Watir / Ruby / Mysql
  Date: Tue, 20 Mar 2007 16:13:16 -0600
  
  you can also just use odbc - the instructions on the kite bird site
  will
  show you how, but you will also need the mysql odbc driver. google 
will
  know where that is.
  
  Paul
  
  - Original Message -
  From: Adam Reed [EMAIL PROTECTED]
  Date: Tuesday, March 20, 2007 2:49 pm
  Subject: Re: [Wtr-general] Watir / Ruby / Mysql
  
Paul,
I don't think this is the same gem you loaded, but for my own
use of a similar setup, I use Ruby DBI:
   
   Usage: http://www.kitebird.com/articles/ruby-dbi.html
   Download: http://rubyforge.org/projects/ruby-dbi/
   
Hope that helps,
Adam
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul 
Hammer
Sent: Tuesday, March 20, 2007 3:07 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Watir / Ruby / Mysql
   
   
I've been using Ruby with Watir for a few months now to scrape
data off
of internal web pages where I work.  I'm fairly happy with the
results,although I want to improve these processes.  I want to put
this data
into mysql (yes, I've designed a schema).
   
On a windows box, I have Watir running with Ruby, and I have mysql
running stand alone.  I've used this command to load the mysql
interface:
   
 gem install mysql
   
and this seemed to complete fine.  Then I used this statement to
try and
connect from ruby to mysql:
   
dbh = Mysql.real_connect(localhost, root, mysql, test)
   
and I got this message:
   
 Error code: 1251
 Error message: Client does not support authentication protocol
requested by server; consider
 upgrading MySQL client
   
What am I missing?
   
Paul
   
_
Get a FREE Web site, company branded e-mail and more from 
Microsoft
Office Live!
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
   
___
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
   
  ___
  Wtr-general mailing list
  Wtr-general@rubyforge.org
  

Re: [Wtr-general] Watir / Ruby / Mysql

2007-03-27 Thread Paul Rogers

I think you do this ( thats for mysql, but should work the same)

dbh = DBI.connect(DBI:Mysql:test:localhost, testuser, testpass)

Paul


- Original Message - 
From: Paul Hammer [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Tuesday, March 27, 2007 7:13 PM
Subject: Re: [Wtr-general] Watir / Ruby / Mysql



 Hi Paul,

 I really appreciate your help here.  I hope you have a moment for 1 more
 question.

 I've tried these steps, and I got this error when responding to the
 question:

  How should SQL server verify the authenticity of the login ID.

 Connection failed:
 SQLState: '01000'
 sql Server Error: 14
 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen
 (ParseConnectParams()).
 Connection failed:
 SQLState: '08001'
 sql Server Error: 14
 [Microsoft][ODBC SQL Server Driver][DBNETLIB]Invalid connection.

 Any suggestions?

 Paul


From: Paul Rogers [EMAIL PROTECTED]
Reply-To: wtr-general@rubyforge.org
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Watir / Ruby / Mysql
Date: Fri, 23 Mar 2007 21:14:05 -0600

you need to create a dsn
goto control panel,
administrative tools
Data sources
click the system dsn
then add
and add stuff for your db, host etc

then you can use odbc from DBI, something like this
dbh=DBI::ODBC::my_DSN.connect

Paul


- Original Message -
From: Paul Hammer [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Friday, March 23, 2007 4:32 PM
Subject: Re: [Wtr-general] Watir / Ruby / Mysql


 
  Paul,
 
  I'm making progress.  I downloaded the mysql ODBC driver to my machine,
  and
  run the setup.exe.  This seems to have run fine.
 
  Now, how is ruby setup to know about the driver, and how do I configure
  the
  driver to know about the mysql on the machine?  I've dug around on the
  mysql
  site for documents on this, but haven't found anything.
 
  thanks,
 
  Paul Hammer
 
 
 From: Paul Rogers [EMAIL PROTECTED]
 Reply-To: wtr-general@rubyforge.org
 To: wtr-general@rubyforge.org
 Subject: Re: [Wtr-general] Watir / Ruby / Mysql
 Date: Fri, 23 Mar 2007 13:52:58 -0600
 
 Ive never installed like that. Ive always used the mysql odbc driver 
 and
 used that
 
 http://dev.mysql.com/downloads/connector/odbc/3.51.html
 
 - Original Message -
 From: Paul Hammer [EMAIL PROTECTED]
 To: wtr-general@rubyforge.org
 Sent: Friday, March 23, 2007 11:25 AM
 Subject: Re: [Wtr-general] Watir / Ruby / Mysql
 
 
  
   Adam  Paul,
  
   Thanks for responding.  I was just reading the prerequisites section
   for
   the
   Ruby DBI, and it says:
  
   ...you'll need to have both the Ruby MySQL module and the C API
   installed.
  
   Can you tell me where I can find these packages?
  
   Paul
  
  
  From: Paul Rogers [EMAIL PROTECTED]
  Reply-To: wtr-general@rubyforge.org
  To: wtr-general@rubyforge.org
  Subject: Re: [Wtr-general] Watir / Ruby / Mysql
  Date: Tue, 20 Mar 2007 16:13:16 -0600
  
  you can also just use odbc - the instructions on the kite bird site
  will
  show you how, but you will also need the mysql odbc driver. google
will
  know where that is.
  
  Paul
  
  - Original Message -
  From: Adam Reed [EMAIL PROTECTED]
  Date: Tuesday, March 20, 2007 2:49 pm
  Subject: Re: [Wtr-general] Watir / Ruby / Mysql
  
Paul,
I don't think this is the same gem you loaded, but for my own
use of a similar setup, I use Ruby DBI:
   
   Usage: http://www.kitebird.com/articles/ruby-dbi.html
   Download: http://rubyforge.org/projects/ruby-dbi/
   
Hope that helps,
Adam
   
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Paul
Hammer
Sent: Tuesday, March 20, 2007 3:07 PM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Watir / Ruby / Mysql
   
   
I've been using Ruby with Watir for a few months now to scrape
data off
of internal web pages where I work.  I'm fairly happy with the
results,although I want to improve these processes.  I want to 
put
this data
into mysql (yes, I've designed a schema).
   
On a windows box, I have Watir running with Ruby, and I have 
mysql
running stand alone.  I've used this command to load the mysql
interface:
   
 gem install mysql
   
and this seemed to complete fine.  Then I used this statement to
try and
connect from ruby to mysql:
   
dbh = Mysql.real_connect(localhost, root, mysql, 
test)
   
and I got this message:
   
 Error code: 1251
 Error message: Client does not support authentication protocol
requested by server; consider
 upgrading MySQL client
   
What am I missing?
   
Paul
   
_
Get a FREE Web site, company branded e-mail and more from
Microsoft
Office Live!
http://clk.atdmt.com/MRT/go/mcrssaub0050001411mrt/direct/01/
   
___
Wtr-general mailing list

Re: [Wtr-general] little framework

2007-03-27 Thread Paul Rogers
See below...

- Original Message - 
From: aidy lewis [EMAIL PROTECTED]
To: wtr-general@rubyforge.org
Sent: Tuesday, March 27, 2007 3:20 PM
Subject: Re: [Wtr-general] little framework


 Paul Rogers says

 the ParentClass would have methods to validate that everything is there, 
 the title  is correct etc. It also has the code to do the translation of 
 the descrptive  name (  eg login_button) to the actual element ( 
 button(:value , 'Login Now!')

 Very good idea. I have been struggling with the concept of making
 automated acceptance tests OO. What could I do? Have a Login class
 with a constructor containing ie.goto(url) - and extend that??

PMR -- id probably have a goto method for the class, that goes to the 
correct page, but some pages probably arent directly accessable from a url 
( the page displayed after submitting a form for example)   . In this case, 
the login page is quite likely to be accessible.

 class MyLoginPage  SomeParentClass

 would you ever extend MyLoginPage or add additional methods to that
 class as needs occurr?
PMR -- Id add any methods I needed. Ive been wondering what to do about 
error messages on the login page. ( ie yo get a message that says Pass word 
or username wrong - is that a new class ( LoginPageWithErrorMessage  
MyLoginPage ) , or part of the login class - I cant ddecide.

 Where do modules come into this framework?

PMR --
I think I would do some thing like
Module UserScreens
class LoginPage...

class DoSomethingPage
end

Module AdminScreens
..
end

 Bob Cotton from Rally has doe some similar type things, as has Elizabeth
 Hendrickson. Another guy I have worked with also came up with something
 similar, which makes me think this is sort of okay.

 yes, there are some people who you can more or less have complete
 faith in; but not many.


 Ive also been using something like this for model based testing, which 
 really is
 kind of neat.

 I know nothing of this. Maybe off-topic. Would you consider this agile?

Chris already answered this - google for Harry Robinson - hes the expert.

 Would you mind me looking into these ideas, and if I tag your name on
 - blogging them or adding them to the wiki or something?

PMR -- go ahead !


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


[Wtr-general] Your Opinion

2007-03-27 Thread Sergio Pinon
I hope this isn’t unappropriate but I figured that since it was a general 
community for WATIR it would be ok.

I have developed a small test engine for hanlding automated testing of 
application UI’s. I was looking to get some feedback on how it can improve. 
Here is the source forge link to the project: 
http://sourceforge.net/projects/after

There is an installer for the latest release. Though the latest changes that I 
will mention next haven’t been released in an installer yet so you way want to 
get the latest files from the repository using SVN.
 
The goal of the engine is to provide a common testing engine to handle UI 
testing of any application type. So I have written application libraries that 
consume WATIR for Internet Explorer browsers and one that consumes AutoIt to 
handle testing against Windows EXE applications. The tests are written in XML 
currently but with the latest change I just made that is now configurable as 
well. So I only have an XmlScriptReader class but there could be an 
ExcelScriptReader, CSVScriptReader or whatever else and it could work the same 
way. Also the results are output in an XML format and there are XSL scripts 
available that would allow that data to be consumed by CruiseControl or other 
continuous integration systems.
 
Thanks again for any feedback that you can offer.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

Re: [Wtr-general] Unable to select the button from button-menu

2007-03-27 Thread Angrez Singh

Hi,

Did you followed the Charley's reply to this thread regarding the error that
you are getting?

Regards,
Angrez

On 3/27/07, Mathew Jacob [EMAIL PROTECTED] wrote:


 I am getting the following error.



:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1830:in
`method_missing': document (WIN32OLERuntimeError)

OLE error code:80070005 in Unknown

  Access is denied.



HRESULT error code:0x80020009

  Exception occurred. from c:/ruby/lib/ruby/gems/1.8/gems/watir-
1.5.1.1158/./watir.rb:1830:in `wait'

from 
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:1829:in
`wait'

from 
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.5.1.1158/./watir.rb:2577:in
`click'

from ./MongoFnDef.rb:39:in `login'

from C:/ruby/samples/RubySrc-1.8.4/sample/MongoMain.rb:23



Please look into this



Regards,



Mathew





* *


*Ya**ho**o India, EGL, Bangalore – 71, Phone:+91-80-30516346,
Mobile:+91-9945849925*
  --

*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *Angrez Singh
*Sent:* Tuesday, March 27, 2007 7:33 PM
*To:* wtr-general@rubyforge.org
*Subject:* Re: [Wtr-general] Unable to select the button from button-menu



Hi Mathew,

The code written in watir 1.4.1 should work with watir 1.5. You install
the latest gem and try the code there. Let me know what problems you face
while selecting the inbox link.

Regards,
Angrez

On 3/27/07, *Mathew Jacob* [EMAIL PROTECTED] wrote:

Hi Angrez,



 I have tried that code.  There is some issue in Watir 1.4 and
Watir 1.5. If I uninstall 1.4 and install 1.5 ,Watir script is not
detecting 'Inbox' link and not able to open 'Inbox' folder. But if I am not
uninstalling 1.4 and install Watir 1.5 then  run the script it is
detecting Inbox link and opening 'Inbox' folder. But in this case it is not
detecting Button on Button-menu. Any solution for this scenario



Regards,



Mathew









* *


*Ya ho**o India, EGL, Bangalore – 71, Phone:+91-80-30516346,
Mobile:+91-9945849925*
  --

*From:* [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
*On Behalf Of *Angrez Singh
*Sent:* Tuesday, March 27, 2007 7:08 PM


*To:* wtr-general@rubyforge.org
*Subject:* Re: [Wtr-general] Unable to select the button from button-menu



Hi Mathew,

The above code works on my machine. It certainly marks the message as read
or unread.

Can you try the code and let me know what happens?

- Angrez
'PS: It has not been tested against Yahoo beta mail.

On 3/27/07, *Mathew Jacob* [EMAIL PROTECTED] wrote:

Not able to select the button in button-menu. Still I am searching for the
solution



Yahoo India, EGL, Bangalore - 71, Phone:+91-80-30516346,
Mobile:+91-9945849925
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of rkkanneganti
Sent: Tuesday, March 27, 2007 6:32 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Unable to select the button from button-menu

Does the above said mail.yahoo.com case is working properly ie..Does Mark
as
Read is getting clicking.
___
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




___
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

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

Re: [Wtr-general] How to get report message after running everytest case

2007-03-27 Thread Jason He
Thanks for your reply.

 

But there will no message output in the console.

Could it output to both console and file?

 

Regards,

Jason



From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Charley Baker
Sent: 2007年3月27日 22:50
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] How to get report message after running everytest 
case

 

You can redirect the output of your bat file to a file: 
mybat.bat  results.txt 

-Charley

On 3/27/07, Jason He  [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]  wrote:

Dear all,

 

I write some the filename of test cases in a windows bat file, execute the bat 
file, and then report messages for each test case will output in the console.

Now, in order to make statistics for these messages, could they also output to 
the log file by script? 

 

 

The following is the report message after running one test case



Finished in 15.063 seconds.

 

  1) Failure:

test_b(TC_rt_r_login) [C:/watir1145/runtime/rt_r_login.rb:34]:

false is not true.

 

5 tests, 4 assertions, 1 failures, 0 errors



 

Regards,

Jason


___
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

Re: [Wtr-general] watir execution from webserver

2007-03-27 Thread Bill Agee
I posted my zipped rails app as an attachment on the Watir contributions page:

http://wiki.openqa.org/display/WTR/Rails+test+runner+example+app

In my haste to reply I lost track of the fact that you already had something 
similar working, except for the issue with the goto method not working (which 
is now solved).  So what you have may actually be a better solution than this 
app. :)

But for what it's worth, the zipfile I posted should be all you need to see my 
app working, provided that rails is installed too.  Please let me know if there 
are any questions.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] About the timeout of waitr

2007-03-27 Thread Jason He
Dear all,

 

What will watir do if the http server (device under test) has no
response during testing? 

 

I find it will wait for timeout and then continue to execute the script
with error message.  But, what is the value of timeout, and could that
timeout event be caught in the script?

 

Regards,

Jason

 

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

Re: [Wtr-general] About the timeout of waitr

2007-03-27 Thread sathees
That will through a timeout exception and script will terminate.
If you wish to continue, then you got to handle that.

begin
timeout(20) do |timeout_length|
ie.goto where ever you want
end
rescue
puts $!
end

this is just the basic, modify as you need.
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Reading from excel files (basic)

2007-03-27 Thread sathees
if you are only getting 4 cells, why the array show a long list with nil. your 
are missing something here. Check your code again!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] Challenging Question!

2007-03-27 Thread sathees
what's wrong with the follwing script? At random point the save picture modal 
dialog hangs and the script waits for manual interaction for that modal and 
continues. I wanted to handle this by giving a timeout of 30 sec. and cancel 
the modal dialog and continue. Timeout is not happening. I guess this is 
because that is one the same thread. So I tried the a new thread for the Save 
function. but still the problem is same.

Any help appreciated.  


 begin
timeout(30) do |timeout_length|
t_start = Time.now
lnk = []
@@ie2.images.each {|image| lnk  image.src}
$imagename = []
i = 0
 lnk.length.times do |x|
  if (lnk[x].include? bedbookers.com)
  # do Nothing
  elsif (lnk[x].include? google)
  # do Nothing
  else
   $imagename[i]  = #{$bb_id} + _ + #{i} 
+ .jpg
   @save_path = 
F\:\\Get_Image\\image\\#{$imagename[i]}
   if File.exists?(@save_path)
puts  
puts Image already Exists in  + 
@save_path
$save_flag = NO
i = i + 1
   else
if  (@@ie2.image(:src, 
lnk[x]).hasLoaded?)
   @@ie2.image(:src, 
lnk[x]).save(@save_path)
   puts  
   puts Image saved to  + 
[EMAIL PROTECTED] 
   i = i + 1
   $save_flag = YES
else
 puts 'Image did not Load . .. ...'
end
   end
  end
 end
t_end = Time.now
puts t_end - t_start
end
   rescue
   puts $!
   w = WinClicker.new
   hwnd = w.getWindowHandle(/Picture/)
if (hwnd = 1)
 puts 'hwnd is ' + #{hwnd}
w.clickWindowsButton_hwnd(hwnd, Cancel)
puts 'Button Cancel clicked'
end
   end
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Scheduler

2007-03-27 Thread sathees
schedule it under windows scheduler!
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


[Wtr-general] hi, how to get TOOLTIP

2007-03-27 Thread Maloy kanti debnath
hi everybody,

In my application lots of function has to be tested by 
tooltip  but unfortunately i don't know to use it so can any bodt help me 
with it. how to get the tooltip
 
thanks

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


Re: [Wtr-general] Your Opinion

2007-03-27 Thread Walter Kruse
How will installing this affect my current Watir installation ?

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sergio Pinon
Sent: 28 March 2007 04:09 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Your Opinion

 

I hope this isn't unappropriate but I figured that since it was a
general community for WATIR it would be ok.

I have developed a small test engine for hanlding automated testing of
application UI's. I was looking to get some feedback on how it can
improve. Here is the source forge link to the project:
http://sourceforge.net/projects/after

There is an installer for the latest release. Though the latest changes
that I will mention next haven't been released in an installer yet so
you way want to get the latest files from the repository using SVN.

The goal of the engine is to provide a common testing engine to handle
UI testing of any application type. So I have written application
libraries that consume WATIR for Internet Explorer browsers and one that
consumes AutoIt to handle testing against Windows EXE applications. The
tests are written in XML currently but with the latest change I just
made that is now configurable as well. So I only have an XmlScriptReader
class but there could be an ExcelScriptReader, CSVScriptReader or
whatever else and it could work the same way. Also the results are
output in an XML format and there are XSL scripts available that would
allow that data to be consumed by CruiseControl or other continuous
integration systems.

Thanks again for any feedback that you can offer. 


**
Everything in this e-mail and attachments relating to the official business of 
MultiChoice Africa is proprietary to 
the company. Any view or opinion expressed in this message may be the view of 
the individual and should not automatically 
be ascribed to the company.  If you are not the intended recipient, you may not 
peruse, use, disseminate, distribute or 
copy this message. If you have received this message in error, please notify 
the sender immediately by email, facsimile 
or telephone and destroy the original message.
**
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general

[Wtr-general] hi, Is there a GOTO function for watir

2007-03-27 Thread Maloy kanti debnath
hi,

IS there any function which is simlar like VB 6.0 GOTO so that 
we can say 
if condition
goto line 8
else
goto line 20
end


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


Re: [Wtr-general] hi, Is there a GOTO function for watir

2007-03-27 Thread Chris McMahon
On 3/28/07, Maloy kanti debnath [EMAIL PROTECTED] wrote:
 hi,

 IS there any function which is simlar like VB 6.0 GOTO so 
 that we can say
 if condition
 goto line 8
 else
 goto line 20
 end

GOTO is not a very good way to do such things.  Try using methods:

###
conditional = yes

#def/end is one method
def method_eight
  puts this is not line 8
end

def method_twenty
  puts this is not line 20
end

if conditional == yes
  method_eight  #invoke method_eight above
  conditional = no
end

if conditional == no
  method_twenty
end
###
___
Wtr-general mailing list
Wtr-general@rubyforge.org
http://rubyforge.org/mailman/listinfo/wtr-general


Re: [Wtr-general] Your Opinion

2007-03-27 Thread Sergio Pinon
This won't affect anything that you have installed. It is meant to consume 
WATIR. It is self contained.


-Original Message-
From: [EMAIL PROTECTED] on behalf of Walter Kruse
Sent: Tue 3/27/2007 11:08 PM
To: wtr-general@rubyforge.org
Subject: Re: [Wtr-general] Your Opinion
 
How will installing this affect my current Watir installation ?

 



From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sergio Pinon
Sent: 28 March 2007 04:09 AM
To: wtr-general@rubyforge.org
Subject: [Wtr-general] Your Opinion

 

I hope this isn't unappropriate but I figured that since it was a
general community for WATIR it would be ok.

I have developed a small test engine for hanlding automated testing of
application UI's. I was looking to get some feedback on how it can
improve. Here is the source forge link to the project:
http://sourceforge.net/projects/after

There is an installer for the latest release. Though the latest changes
that I will mention next haven't been released in an installer yet so
you way want to get the latest files from the repository using SVN.

The goal of the engine is to provide a common testing engine to handle
UI testing of any application type. So I have written application
libraries that consume WATIR for Internet Explorer browsers and one that
consumes AutoIt to handle testing against Windows EXE applications. The
tests are written in XML currently but with the latest change I just
made that is now configurable as well. So I only have an XmlScriptReader
class but there could be an ExcelScriptReader, CSVScriptReader or
whatever else and it could work the same way. Also the results are
output in an XML format and there are XSL scripts available that would
allow that data to be consumed by CruiseControl or other continuous
integration systems.

Thanks again for any feedback that you can offer. 


**
Everything in this e-mail and attachments relating to the official business of 
MultiChoice Africa is proprietary to 
the company. Any view or opinion expressed in this message may be the view of 
the individual and should not automatically 
be ascribed to the company.  If you are not the intended recipient, you may not 
peruse, use, disseminate, distribute or 
copy this message. If you have received this message in error, please notify 
the sender immediately by email, facsimile 
or telephone and destroy the original message.
**

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