[wtr-general] WatirSPlash Question for Jarmo

2010-09-27 Thread tester86
: ‘CallbackFunction6_5’ undeclared here (not in
a function)
win32/api.c:706: error: ‘CallbackFunction6_6’ undeclared here (not in
a function)
win32/api.c:706: error: ‘CallbackFunction6_7’ undeclared here (not in
a function)
win32/api.c:706: error: ‘CallbackFunction6_8’ undeclared here (not in
a function)
win32/api.c:706: error: ‘CallbackFunction6_9’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_0’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_1’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_2’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_3’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_4’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_5’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_6’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_7’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_8’ undeclared here (not in
a function)
win32/api.c:707: error: ‘CallbackFunction7_9’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_0’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_1’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_2’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_3’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_4’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_5’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_6’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_7’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_8’ undeclared here (not in
a function)
win32/api.c:708: error: ‘CallbackFunction8_9’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_0’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_1’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_2’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_3’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_4’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_5’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_6’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_7’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_8’ undeclared here (not in
a function)
win32/api.c:709: error: ‘CallbackFunction9_9’ undeclared here (not in
a function)
win32/api.c: In function ‘api_call’:
win32/api.c:778: error: ‘TRUE’ undeclared (first use in this function)
win32/api.c:780: error: ‘FALSE’ undeclared (first use in this
function)
win32/api.c:782: error: ‘Win32API’ has no member named ‘prototype’
win32/api.c:802: error: ‘LPARAM’ undeclared (first use in this
function)
win32/api.c:802: error: expected ‘;’ before ‘rb_num2ulong’
win32/api.c:813: error: ‘Win32API’ has no member named ‘function’
win32/api.c:819: error: ‘Win32API’ has no member named ‘return_type’
win32/api.c:838: error: ‘TCHAR’ undeclared (first use in this
function)
win32/api.c:838: error: expected expression before ‘)’ token
win32/api.c:840: error: too few arguments to function ‘rb_str_new’
win32/api.c:843: error: expected expression before ‘)’ token
win32/api.c:854: error: expected expression before ‘)’ token
win32/api.c:856: error: too few arguments to function ‘rb_str_new’
win32/api.c:859: error: expected expression before ‘)’ token
lipo: can't open input file: /var/tmp//ccrWXOxG.out (No such file or
directory)
make: *** [api.o] Error 1


Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/win32-
api-1.4.6 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/win32-api-1.4.6/ext/
gem_make.out

Here is my gcc version:


gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There
is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.


When I do gem install watirsplash I get the following error.

ERROR:  While executing gem ... (Errno::EACCES)
Permission denied - /Library/Ruby/Gems/1.8/gems/win32-api-1.4.6/
CHANGES

Any ideas why I am getting these errors Jarmo?

Thanks

tester86

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

watir-general@googlegroups.com
http://groups.google.com/group/watir-general
watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Selecting a value from a drop down list

2010-05-26 Thread tester86
Hi

Thanks for all your help. I managed to solve this issue by accessing
the index of the list i.e.

$b.li(:index, value).fire_event(onmousedown/onmouseup)

I often find that when writing integration test using Watir it is
often the simple solutions that work and that you don't have to over
engineer a simple solution as this one. I have found one thing
interesting though. It is a challenge to automate a Sproutcore
application but it is the best challenge a automation engineer will
face.

Once again thanks for everyone's help and feedback.

tester86


On May 20, 3:03 pm, Chuck van der Linden sqa...@gmail.com wrote:
 What you are dealing with here is a 'ehanced' selection list that is
 implemented entirely with Javascript code.  it's not a standard HTML
 selection list, so none of the standard methods what would work with
 such a list are going to work for you.  (a standard selection list
 would use a select tag, with option tags inside)

 I think your main difficulty is finding a way to identify what
 elements needs to have the .click method called on it.  So in addition
 to what Z has suggested, you might want to have a closer look at the
 contents of the DOM once the list has appeared on the screen.  It's
 entirely possible that the javascript which makes the list appear, may
 have rendered some stuff into the DOM based on those li  elements
 (those are list item elements, normally part of an HTML 'ordered
 list', which is normally a 'read only' HTML element)  and the
 resulting  elements may have associated 'text' that you can use to
 identify the thing you want to click on.  They probably also have
 things like 'onclick' events, and potentially you may need to fire
 that specfic event against the element, but I'd only try that if using
 the normal 'click' method fails.

 What I'd do is work with the IE Developer toolbar, or Firebug.
 Click the thing that makes the list appear, and then in the developer
 toolbar click the 'refresh' icon to have it re-read the DOM, then
 enable the 'select item by click' mode and click on one of the list
 items to see what form it has within the dom.  There might be
 associated text (click + to expand if there's one for the item)  which
 could be used to identify the elements so you can click on it using
 that text as the identifyer.

 On May 19, 1:32 pm, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:





  On Wed, May 19, 2010 at 8:00 PM, tester86 sagar.am...@gmail.com wrote:
   I tried
   $b.li(:class, Option 2).click
   But I still got the same error.

  I am not surprised, because class attribute does not have that value:

  li class=   data-value=Option 2

  This could help you access the element:

 http://wiki.openqa.org/display/WTR/XPath

  Željko

  --
  Before posting, please readhttp://watir.com/support. In short: search 
  before you ask, be nice.

  You received this message because you are subscribed 
  tohttp://groups.google.com/group/watir-general
  To post: watir-general@googlegroups.com
  To unsubscribe: watir-general+unsubscr...@googlegroups.com

 --
 Before posting, please readhttp://watir.com/support. In short: search before 
 you ask, be nice.

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Selecting a value from a drop down list

2010-05-19 Thread tester86
Hi

I have a drop down list which has different values. I have been trying
to select a value from the list but I have had no luck. I used
fire_events, select_list method but I get
Watir::Exception::UnknownObjectException: Unable to locate element.

Code for drop down list is:

ul class=select_options
  li class= selected highlighted  data-value=Option 1 This is
the option that is selected by default
  li class=   data-value=Option 2
  li class=   data-value=Option 3
/ul

So far I am able to generate this list by clicking on the drop down
arrow, this will show the list and now I want to select Option 2 or
Option 3 but I cannot select Option 2 or 3 using select_list or
triggering fire_events. Does any one have any idea's on know to
resolve this issue.

Thanks

tester86

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Selecting a value from a drop down list

2010-05-19 Thread tester86
I tried

$b.li(:class, Option 2).click

But I still got the same error.



On May 19, 9:27 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Wed, May 19, 2010 at 4:13 PM, tester86 sagar.am...@gmail.com wrote:
  ul class=select_options
   li class= selected highlighted  data-value=Option 1 This is
  the option that is selected by default
   li class=   data-value=Option 2
   li class=   data-value=Option 3
  /ul

 This is not select list, this is unordered list.

 Try something like this:

 browser.li(how, what).click

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host
 testingpodcast.com - audio podcasts on software testing. all of them
 vidipodkast.com - pričamo o hardveru, softveru i časopisu Vidi

 --
 Before posting, please readhttp://watir.com/support. In short: search before 
 you ask, be nice.

 You received this message because you are subscribed 
 tohttp://groups.google.com/group/watir-general
 To post: watir-general@googlegroups.com
 To unsubscribe: watir-general+unsubscr...@googlegroups.com

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Drop down menu

2010-03-18 Thread tester86
I have been testing this part of my script in IRB, I also triggered
two fire_event onmousedown then onmouseup. Also tried onmousedown
sleep 1 then onmouseup, tried and tested all the possbile combinations
and methods.

When onmousedown is triggered in the table it generated the drop down
list -- but it shows up as blank then if you go and select a value via

$b.select_list(:index, 2).select(Test)
$b.select_list(:index, 2).set(Test

it cannot find the element.

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com

To unsubscribe from this group, send email to 
watir-general+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[wtr-general] Re: Drop down menu

2010-03-17 Thread tester86
Hi
(
I did try text_field before but it does not work, after I set focus
and execute text_field(:index, 2).set(Test) error stating index 2
has been disabled. What I am doing: I set the focus in the drop down,
then set onblur(if i do $b.select_list(:value, Test).click this
clicks on the default value in the drop down) however the list is
invisible checked using firebug. I need to somehow click on the drop
down again in order to display the list. I have tried various
combinations but nothing working. I have triggered fire_events.

Thanks

On Mar 16, 10:55 pm, Mrunal mrunal.gor...@gmail.com wrote:
 Hi

 In case when there is drop down arrow, the elements are set using
 text_field sometimes.
 Please try this option also.

 e.g. $ie.text_field(:name,'').set('')



 tester86 wrote:
  Hi

  I did fire a javascript event that will set the focus in the drop down
  list:

  $b.table(:index, 1)[2][6].fire_event(onmousedown)

  When the above line is executed it does not display the drop but it is
  focused. When I do either of the following:

   $b.select_list(:index, 2).select(Test)
   $b.select_list(:index, 2).set(Test)

  It does not select the link. I have to somehow click on the drop down
  arrow again in order to populate the drop down list. This is the same
  behavior when selecting a value in the drop down list manually.

  Thanks

  On Mar 15, 5:29 pm, Tiffany Fodor tcfo...@comcast.net wrote:

  Hi!

  You have a typo in your select statement:

  $b.select_list(:index, 2).select_list(Test)

  should be:

  $b.select_list(:index, 2).select(Test)  (although, I think
  $b.select_list(:index, 2).set(Test) should work as well)

  Have you tried firing your javascript to put focus on the field just
  before attempting the select statement?

  Hope this helps!

  -Tiffany

  On Mar 15, 2:43 pm, tester86 sagar.am...@gmail.com wrote:

  I need to click on a drop down.  I have a script that will set the
  focus in the drop down list then when I go to select the value it does
  not select the list. Manually: When I click in the drop down field it
  gets activated then when I click on the drop down arrow it will
  display the list.

  Interaction:

  When I click in the cell it sets the focus, then I have to click on
  the drop down arrow in order to see the list of options. If I do:

  $b.table(:index, 1)[2][6].fire_event(onmousedown)

  The above will set the focus in the field that contains the drop down.
  Manually I have click on the drop down in order to see the list

  If I do:

  $b.select_list(:index, 2).select_list(Test)

  It does not click on Test. Is there any way I can click on the drop
  down in order to see the list..

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Re: Drop down menu

2010-03-16 Thread tester86
Hi

I did fire a javascript event that will set the focus in the drop down
list:

$b.table(:index, 1)[2][6].fire_event(onmousedown)

When the above line is executed it does not display the drop but it is
focused. When I do either of the following:


 $b.select_list(:index, 2).select(Test)
 $b.select_list(:index, 2).set(Test)

It does not select the link. I have to somehow click on the drop down
arrow again in order to populate the drop down list. This is the same
behavior when selecting a value in the drop down list manually.

Thanks



On Mar 15, 5:29 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Hi!

 You have a typo in your select statement:

 $b.select_list(:index, 2).select_list(Test)

 should be:

 $b.select_list(:index, 2).select(Test)  (although, I think
 $b.select_list(:index, 2).set(Test) should work as well)

 Have you tried firing your javascript to put focus on the field just
 before attempting the select statement?

 Hope this helps!

 -Tiffany

 On Mar 15, 2:43 pm, tester86 sagar.am...@gmail.com wrote:



  I need to click on a drop down.  I have a script that will set the
  focus in the drop down list then when I go to select the value it does
  not select the list. Manually: When I click in the drop down field it
  gets activated then when I click on the drop down arrow it will
  display the list.

  Interaction:

  When I click in the cell it sets the focus, then I have to click on
  the drop down arrow in order to see the list of options. If I do:

  $b.table(:index, 1)[2][6].fire_event(onmousedown)

  The above will set the focus in the field that contains the drop down.
  Manually I have click on the drop down in order to see the list

  If I do:

  $b.select_list(:index, 2).select_list(Test)

  It does not click on Test. Is there any way I can click on the drop
  down in order to see the list..

-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] Drop down menu

2010-03-15 Thread tester86
I need to click on a drop down.  I have a script that will set the
focus in the drop down list then when I go to select the value it does
not select the list. Manually: When I click in the drop down field it
gets activated then when I click on the drop down arrow it will
display the list.

Interaction:

When I click in the cell it sets the focus, then I have to click on
the drop down arrow in order to see the list of options. If I do:

$b.table(:index, 1)[2][6].fire_event(onmousedown)

The above will set the focus in the field that contains the drop down.
Manually I have click on the drop down in order to see the list

If I do:

$b.select_list(:index, 2).select_list(Test)

It does not click on Test. Is there any way I can click on the drop
down in order to see the list..


-- 
Before posting, please read http://watir.com/support. In short: search before 
you ask, be nice.

You received this message because you are subscribed to 
http://groups.google.com/group/watir-general
To post: watir-general@googlegroups.com
To unsubscribe: watir-general+unsubscr...@googlegroups.com


[wtr-general] IRB and Firewatir script

2010-02-18 Thread tester86
Hi

In an IRB session when I trigger an onmousedown and onmouseup event on
a link that generates a modal dialogue box it shows the modal
dialogue. Then when I copy that code into a test case and execute
firefox does not generate the modal dialogue.

Code:

$b.span(:class, value ell).fire_event(onmousedown)

$b.span(:class, value ell).fire_event(onmouseup)

Result: modal dialogue shown

When this is placed in a test case and executed does not show modal
dialogueAny clues.

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Question About Watir

2010-02-17 Thread tester86
Hi

I am automating a website where every time the ID's change and my
scripts need to cope with this change. For example if I click on a
link and next time the value of the link will change.

Is there any scope or any implementation that can be implemented to
cope with this. I have talked with a developer and they mentioned that
I should consider writing a custom method? How does Watir cope with
changing ID's?

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Question About Watir

2010-02-17 Thread tester86
Hi

I came across that example before on automation frameworks. I have
already started to implement a framework. But my question was is there
any way Watir supports automatically generated ID's?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: FireWatir: fire_event(onkeypress) returning error message

2010-02-15 Thread tester86
Hi

I have tried all of the different scenarios in order to perform a
double click action when clicking a text field. But in Firewatir 1.6.5
the fire_event(ondblclick) is not working.

Is there an issue with firewatir 1.6.5 because I saw another thread
where a person was having the same issue with dblclick in Firewatir
1.6.5. Should I downgrade to 1.6.2??

Thanks
Can you make it when you click twice?
***.click
***.click

   I tried .click .click twice on the label, but it did not click on the
   label.

  -- After debugging I noticed that when I do $b.element_by_xpath('//
  label[text()=Research]').click, in fire bug it does click on the
  label but the watir command does not go to the next page as intended.
  If I replace the click with a fire_event(ondblclick) as mentioned it
  just returns 0. Does anyone have any solutions.

  Thanks

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: div values in table

2010-02-09 Thread tester86
Hi

The value 601 is stored in total and I want to make sure that 'total'
matches the value on the screen (overall total). Is there any way that
I can compare to make sure that is it the correct total.

if total 601
and
overall total is 601

passed.

I tried to do if $b.contains_text(total) but it fails.



On Feb 8, 3:02 pm, orde ohil...@gmail.com wrote:
 The .html method is returning a string value.   So, you're adding
 14.56 and 85.00 to create 14.5685.00

 You need to convert the a and b variables to a numeric class.  In this
 case, you want to use .to_f:

 total = a.to_f +  b.to_f

 Hope that helps.

 orde

 On Feb 8, 12:45 pm, tester86 sagar.am...@gmail.com wrote:



  Sorry but in IRB when I do

  a= $b.table(:index, 1)[2][11].html
  print 14.56

  b=$b.table(:index, 1)[2][11].html
  print 85.00

  total = a +  b

  in IRB it returns 14.5685.00

  when it should return 99.56

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] div values in table

2010-02-08 Thread tester86
hi

I am printing out the value in a column in irb and then I want to
store that value in a variable and  calculate the two values. If I do

$b.table(:index, 1)[2][11].html
print $90

$b.table(:index, 1)[3][11].html
print $80

Then if I do:

def test_total(a,y)

a= $b.table(:index, 1)[2][11].html
y=$b.table(:index, 1)[3][11].html

total = a + y

return total

end

In IRB it returns Nil

Does anyone have any ideas on why this is not working and returning
nil. If not can someone point me in the correct direction.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: div values in table

2010-02-08 Thread tester86
Please disregard this post...I have got it working.

Thanks

On Feb 8, 2:33 pm, tester86 sagar.am...@gmail.com wrote:
 hi

 I am printing out the value in a column in irb and then I want to
 store that value in a variable and  calculate the two values. If I do

 $b.table(:index, 1)[2][11].html
 print $90

 $b.table(:index, 1)[3][11].html
 print $80

 Then if I do:

 def test_total(a,y)

 a= $b.table(:index, 1)[2][11].html
 y=$b.table(:index, 1)[3][11].html

 total = a + y

 return total

 end

 In IRB it returns Nil

 Does anyone have any ideas on why this is not working and returning
 nil. If not can someone point me in the correct direction.

 Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: div values in table

2010-02-08 Thread tester86
Sorry but in IRB when I do

a= $b.table(:index, 1)[2][11].html
print 14.56

b=$b.table(:index, 1)[2][11].html
print 85.00

total = a +  b

in IRB it returns 14.5685.00

when it should return 99.56

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: div values in table

2010-02-08 Thread tester86
please diregard this post I have found the solution.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: div values in table

2010-02-08 Thread tester86
Yep, I was using to_i but it was rounding up the numbers. I will try
to_f.

Thanks orde

On Feb 8, 3:02 pm, orde ohil...@gmail.com wrote:
 The .html method is returning a string value.   So, you're adding
 14.56 and 85.00 to create 14.5685.00

 You need to convert the a and b variables to a numeric class.  In this
 case, you want to use .to_f:

 total = a.to_f +  b.to_f

 Hope that helps.

 orde

 On Feb 8, 12:45 pm, tester86 sagar.am...@gmail.com wrote:



  Sorry but in IRB when I do

  a= $b.table(:index, 1)[2][11].html
  print 14.56

  b=$b.table(:index, 1)[2][11].html
  print 85.00

  total = a +  b

  in IRB it returns 14.5685.00

  when it should return 99.56

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Handle Failures in Watir

2010-02-04 Thread tester86
Hi

Question for the watir group. When I run my test sometimes it fails if
it cannot find an element or input field. Is there a way that when
this occurs it can log that failure and continue running the tests and
not stop. Is there any Watir commands that I can put in place at
points in my script to cope with failures?

I am using the ruby logger to output all my result into a text file.

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Handle Failures in Watir

2010-02-04 Thread tester86
Hi

I have been using if/else statements in my scripts but I was just
wondering if there was other ways that I could handle exceptions.
Thanks for your help.

On Feb 4, 12:03 pm, orde ohil...@gmail.com wrote:
 You could do it a couple of ways.

 1. Use an if/else statement (as seen here 
 -http://wiki.openqa.org/display/WTR/Example+Logging)

 if condition=true
    # log pass
 else
    # log fail
 end

 2. Use the Exception class:

 Here's the basic syntax:

 begin
   # do something
 rescue
   # log the failure if it fails.
 end

 For more detailed info, I'd strongly suggest getting familiar 
 withhttp://www.ruby-doc.org/docs/ProgrammingRuby/html/tut_exceptions.html
 and/orhttp://www.ruby-doc.org/core/classes/Exception.html

 orde

 On Feb 4, 8:55 am, tester86 sagar.am...@gmail.com wrote:



  Hi

  Question for the watir group. When I run my test sometimes it fails if
  it cannot find an element or input field. Is there a way that when
  this occurs it can log that failure and continue running the tests and
  not stop. Is there any Watir commands that I can put in place at
  points in my script to cope with failures?

  I am using the ruby logger to output all my result into a text file.

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] CSS Selectors

2010-02-02 Thread tester86
Hi

I want to use CSS selectors for scripting but when I input the
following command in IRB:

$b.document.getElementbyID(IDValue)

I get the following error message stating undefined getElementbyID. I
am running my scripts against FF 3.5.7. Dose anyone know how I can
resolve this error message or point me in the right direction to using
CSS selectors with examples.

Thanks

tester86

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: FireWatir: fire_event(onkeypress) returning error message

2010-01-29 Thread tester86
 Can you make it when you click twice?
 ***.click
 ***.click

I tried .click .click twice on the label, but it did not click on the
label.

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: FireWatir: fire_event(onkeypress) returning error message

2010-01-29 Thread tester86

  Can you make it when you click twice?
  ***.click
  ***.click

 I tried .click .click twice on the label, but it did not click on the
 label.


-- After debugging I noticed that when I do $b.element_by_xpath('//
label[text()=Research]').click, in fire bug it does click on the
label but the watir command does not go to the next page as intended.
If I replace the click with a fire_event(ondblclick) as mentioned it
just returns 0. Does anyone have any solutions.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Watir + Verify JSON Response

2010-01-28 Thread tester86
Hi

Thanks for the link, but for now the application is not returning the
response in the url. If I open up firebug  I can see the contents of
the JSON repsonse header in there. Is there any way to check that for
now.

Thanks

On Jan 26, 11:18 am, karim rayani karim.ray...@gmail.com wrote:
 Hello,

 Yeh we can read the JSON response.

 if we have a JSON output from some URL. then we can

 check this one for more help on going about reading a json output in 
 RUBYhttp://snippets.dzone.com/posts/show/6133

 On 1/25/10, tester86 sagar.am...@gmail.com wrote:



  Hi

  Using Watir is it possible to check the JSON response content to make
  sure that I am getting the correct result.

  Example JSON Response

  Content
    ID  9
    username   t...@google.com

  Thanks,

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] FireWatir: fire_event(onkeypress) returning error message

2010-01-28 Thread tester86
Hi

I am using firewatir and when I use the following code:

$b.text_field(:type, text).set(Res).fire_event(onkeypress)

I also tried $b.text_field(:type, text).set(Res).fire_event
('onkeypress')

I get the following error message:

NoMethodError: undefined method `fire_event' for 0:Fixnum

This causes my test to fail at this point and will not execute the
rest of the test. Also if there any fire_event for a double click
action without specifying onmousedown and onmouseup?

Thanks,

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: ERROR: Error installing watir:

2010-01-25 Thread tester86
Hi

I'm not 100% sure but I think you might have to install nmake.



On Jan 22, 8:17 pm, Jag jag.jag...@gmail.com wrote:
 Hi,
 After installing Ruby 1.8.6 (Also tried 1.9)
 then followed the steps

 gem update --system
 gem install watir

 getting this error with ruby1.9

 ERROR:  Error installing watir:
         ERROR: Failed to build gem native extension.

 C:/Ruby19/bin/ruby.exe extconf.rb
 checking for strncpy_s()... *** extconf.rb failed ***
 Could not create Makefile due to some reason, probably lack of
 necessary libraries and/or headers.  Check the mkmf.log file for more
 details.  You may need configuration options.

 Provided configuration options:
         --with-opt-dir
         --without-opt-dir
         --with-opt-include
         --without-opt-include=${opt-dir}/include
         --with-opt-lib
         --without-opt-lib=${opt-dir}/lib
         --with-make-prog
         --without-make-prog
         --srcdir=.
         --curdir
         --ruby=C:/Ruby19/bin/ruby
 C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:362:in `try_do': The complier failed
 to generat
 e an executable file. (RuntimeError)
 You have to install development tools first.
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:415:in `try_link0'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:419:in `try_link'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:527:in `try_func'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:772:in `block in
 have_func'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:668:in `block in
 checking_for'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block (2 levels)
 in postpo
 ne'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:274:in `block in
 postpone'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:248:in `open'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:270:in `postpone'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:667:in `checking_for'
         from C:/Ruby19/lib/ruby/1.9.1/mkmf.rb:771:in `have_func'
         from extconf.rb:9:in `main'

 Gem files will remain installed in C:/Ruby19/lib/ruby/gems/1.9.1/gems/
 win32-api-
 1.4.5 for inspection.
 Results logged to C:/Ruby19/lib/ruby/gems/1.9.1/gems/win32-api-1.4.5/
 ext/gem_mak
 e.out

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] RE: Drag and Drop using Watir

2010-01-21 Thread tester86
Hi

I have been doing some reserach on drag and drop using Watir. From
what I can understand it is not feasiable yet, but it can be down via
fire events.

I have managed to select the div element that I want to drag to
another screen view but I cannot seem to drag it into that view.

When I use $b.div(:id, 8987).dragto(splitview)

I get an error message saying that drag to is not a function. I tried
using onmousemove but it returns 0 in irb. Then when I do onmouseup it
just lets go of the element.

Does anyone have any ideas or any sites that they can direct me to?

Thanks
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Drag and Drop using Watir

2010-01-21 Thread tester86
Thanks for pointing me to that thread. It has helped out a little bit,
but once I have clicked on the element in the table I did to drag it
to the screen below. The screen is split in two views so I can take it
from the top and drag it to the bottom. So far I have not used a right
click or left click just an onMouseDown to get the element that I want
to drag...Just having troubling trying to drag it into the second
screen.

Thanks for your help!


On Jan 21, 2:11 pm, Alan Baird alan.ba...@riskmetrics.com wrote:
 See this thread for some suggestions:

 http://groups.google.ca/group/watir-general/browse_thread/thread/d45e...



 -Original Message-
 From: watir-general@googlegroups.com [mailto:watir-gene...@googlegroups.com] 
 On Behalf Of tester86
 Sent: Thursday, January 21, 2010 1:38 PM
 To: Watir General
 Subject: [wtr-general] RE: Drag and Drop using Watir

 Hi

 I have been doing some reserach on drag and drop using Watir. From
 what I can understand it is not feasiable yet, but it can be down via
 fire events.

 I have managed to select the div element that I want to drag to
 another screen view but I cannot seem to drag it into that view.

 When I use $b.div(:id, 8987).dragto(splitview)

 I get an error message saying that drag to is not a function. I tried
 using onmousemove but it returns 0 in irb. Then when I do onmouseup it
 just lets go of the element.

 Does anyone have any ideas or any sites that they can direct me to?

 Thanks

 This email message and any attachments are for the sole use of the intended 
 recipients and may contain proprietary and/or confidential information which 
 may be privileged or otherwise protected from disclosure. Any unauthorized 
 review, use, disclosure or distribution is prohibited. If you are not an 
 intended recipient, please contact the sender by reply email and destroy the 
 original message and any copies of the message as well as any attachments to 
 the original message.- Hide quoted text -

 - Show quoted text -
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time

2010-01-20 Thread tester86
Sorry my typo in options.yml I have it as

browser: ie
browser: firefox

When I do $b = Watir::firefox.start(your url) I get an error
message:

NoMethodError: undefined method `firefox' for Watir:Module

I have require 'firewatir'

Is there are reason why I cannot run it aginst FF because I want to
execute my scripts against both IE and FF.

Thanks

On Jan 20, 8:07 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Wed, Jan 20, 2010 at 3:00 PM, tester86 sagar.am...@gmail.com wrote:
  Browser ie

 I think this should be:

 browser: ie

 Željko
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time

2010-01-20 Thread tester86
Well, my point that I am trying to get at is that I want to execute my
code against IE and FF. All of the disucssion is making me stick to
either run it again IE and FF. Is there any way I that I can a browser
i.e. IE run my code then when it finishes run it again (same code) but
in FF. I have used the example from: 
http://wiki.openqa.org/display/WTR/Browser.new
but I cannot get it to execute.

Thanks


On Jan 20, 8:24 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Wed, Jan 20, 2010 at 3:20 PM, tester86 sagar.am...@gmail.com wrote:
  Sorry my typo in options.yml I have it as

 You have to be careful when copy/pasting code. Everything matters.

  When I do $b = Watir::firefox.start(your url) I get an error
  message:
  NoMethodError: undefined method `firefox' for Watir:Module

 Well, your syntax is wrong. It should be:

 browser = FireWatir::Firefox.new

 More information:

 http://wiki.openqa.org/display/WTR/FireWatir+Example+Script

 Željko
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time

2010-01-19 Thread tester86
Welsey,

I changed my script according to what you mentioned above. When I run
it in IE I get the following error message:

NoMethodError: undefined method `text_field' for nil:NilClass

All I am trying to do is to login to an application:

$b.text_field(:name, username).set(user1)
$b.text_field(:name, password).set(X)
$b.link(:id, button1).fire_event(onMouseDown)
$b.link(:id, button1).fire_event(onMouseUp)


Any Idea's since when I run my scripts in IE I seem to get error
message like that for different things i.e. text field and links

Thanks
On Jan 15, 8:41 pm, Wesley Chen cjq@gmail.com wrote:
 You may change
 *Class TestGoogle  Test::Unit::TestCase*
 to
 *class TestGoogle  Watir::TestCase*
 And
 *require 'watir'
 require 'watir/testcase'*

 Thanks.
 Wesley Chen.
 For life, the easier, the better.



 On Sat, Jan 16, 2010 at 5:35 AM, Bill Agee billa...@gmail.com wrote:
  Can you post the complete backtrace?  I bet the method test_entertext is
  being run before test_start.

  If I remember correctly, Test::Unit runs the methods inside a test class in
  asciibetical order.

  You might want to collapse all three of those methods into one.  There's
  probably no real gain in having them be separated.

  On Fri, Jan 15, 2010 at 11:31 AM, tester86 sagar.am...@gmail.com wrote:

  Hi

  Please note that this is an example of what tests.

  Class TestGoogle  Test::Unit::TestCase

  def test_start()

  $b=Watir::Browser.start(https://www.google.com;)

  end

  def test_entertext()
  $b.text_field(:name, SearchField).set(Search)
  $b.button(:name, btnG).click
  end

  def test_verify()

  if $b.contains_text(Search)
  puts passed
  else
  puts failed
  end

  end

  end

  In my options.yml if I tell it to run with IE then in command prompt I
  get the error $b is not defined.

  --

  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general- Hide quoted text -

 - Show quoted text -
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time

2010-01-15 Thread tester86
Hi

Please note that this is an example of what tests.

Class TestGoogle  Test::Unit::TestCase

def test_start()

$b=Watir::Browser.start(https://www.google.com;)

end

def test_entertext()
$b.text_field(:name, SearchField).set(Search)
$b.button(:name, btnG).click
end

def test_verify()

if $b.contains_text(Search)
puts passed
else
puts failed
end

end

end

In my options.yml if I tell it to run with IE then in command prompt I
get the error $b is not defined.
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time

2010-01-14 Thread tester86
Hi

Question:

I am using a testing framework using Watir and I have given a global
variable $b. I am running my scripts against FF. But I also want to
execute them against IE. I am using the example from:

http://wiki.openqa.org/display/WTR/Browser.new

But when I execute in IE I get the error $b is undefined. Is there any
solution to this problem as I would like to run my scripts in FF and
after in IE.

Thanks,
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Watir - Going down a to read the next element and perform click action on a button

2010-01-12 Thread tester86
HI

With the app there is an id association but sproutcore considers
everything as a link and you have to use onmousedown and onmouseup in
order to select a checkbox. When I use that with watir it does not
click on the second link it just unchecks the first link. If you have
any ideas for suggestions that would be great.

Thanks

On Jan 11, 3:00 pm, Charley Baker charley.ba...@gmail.com wrote:
 Watir supports anything that's part of the dom. I don't know sproutcore, but
 any JS libraries are fine. ID association is great and if you can enforce
 unique ids, it'll make testing easier.

 -c



 On Mon, Jan 11, 2010 at 1:51 PM, tester86 sagar.am...@gmail.com wrote:
  Hi

  I maybe starting another thread but thought I'd post my message on
  here. How does Watir support Javascript (sproutcore). For example if I
  wanted to click on a checkbox sproutcore considers it as a link which
  has an ID assoication.

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general- Hide quoted text -

 - Show quoted text -
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Watir - Going down a to read the next element and perform click action on a button

2010-01-11 Thread tester86
Hi

I maybe starting another thread but thought I'd post my message on
here. How does Watir support Javascript (sproutcore). For example if I
wanted to click on a checkbox sproutcore considers it as a link which
has an ID assoication.
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time

2010-01-05 Thread tester86
Hi

Yes you are correct but when I executed it that way it did open a
firefox session. My question is would I have to write two sets of code
one for ie and one for ff in order to run my script against both
browsers.

Thanks.

On Jan 4, 9:11 pm, Wesley Chen cjq@gmail.com wrote:
 First, I think there is something wrong in your script.
 1. You use ie for both ie browser and FF browser;
 2. Your Firefox invoke way is not right.
 I think it works if you use:
 *require 'watir'
 ie = Watir::IE.new
 ie.goto(www.google.com)
 ff = FireWatir::Firefox.new
 ff.goto(www.google.com)*

 Thanks.
 Wesley Chen.
 For life, the easier, the better.



 On Mon, Jan 4, 2010 at 11:03 PM, tester86 sagar.am...@gmail.com wrote:
  Hi

  From my research as far as I understand you can not drive watir
  scripts at the same time in the browser unless you create seperate
  scripts for them. I have a Test::Unit script that runs in Firefox but
  when I specify IE it just opens a new browser and nothing happens. I
  am guess that I would have to write a different set of code for that.

  example:

  ie=Watir::IE.new
  ie.goto(www.google.com)

  ie=FireWatir.FireFox.new
  ie.goto(www.google.com)

  # then a code to perform search

  When I run a script like this it only performs the search in Firefox
  and not in IE. Is ther any solution to execute against both browsers.

  Thanks

  --
  You received this message because you are subscribed to the Google Groups
  Watir General group.
  To post to this group, send email to watir-general@googlegroups.com
  Before posting, please read the following guidelines:
 http://wiki.openqa.org/display/WTR/Support
  To unsubscribe from this group, send email to
  watir-general-unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/watir-general- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Driving Watir scripts in IE and Firefox at the same time

2010-01-05 Thread tester86
Question, with the not tested code:

If I was to test against one application or browser i.e. google and
then search in both IE and FF would I need to specify the code twice.

Could I state:

Open IE
Open FF

Check Page Title
Text Box Place Test
Click Search

End

All of the above would be one set of code not duplicating the code
twice..

On Jan 5, 9:30 am, tester86 sagar.am...@gmail.com wrote:
 Hi

 Or would you like to do something like this (not tested)?



  [Watir::IE.new, FireWatir::Firefox.new].each do |browser|
    browser.goto google.com
    browser.goto yahoo.com
  end

  The above code will go to google and yahoo first in IE, and then in FF

 --Yes I would like something like that. Has this been tested or is
 there any good documentation?

 Thanks

 On Jan 5, 8:29 am, Željko Filipin zeljko.fili...@wa-research.ch
 wrote:



  On Tue, Jan 5, 2010 at 3:21 PM, tester86 sagar.am...@gmail.com wrote:
   My question is would I have to write two sets of code
   one for ie and one for ff in order to run my script against both
   browsers.

  I am not sure what you mean by this. Would this work for you?

  ie = Watir::IE.new
  ie.goto google.com

  ff = FireWatir::Firefox.new
  ff.goto google.com

  ie.goto yahoo.com
  ff.goto yahoo.com

  Or would you like to do something like this (not tested)?

  [Watir::IE.new, FireWatir::Firefox.new].each do |browser|
    browser.goto google.com
    browser.goto yahoo.com
  end

  The above code will go to google and yahoo first in IE, and then in FF.

  Željko
  --
  watir.com - community manager
  watirpodcast.com - host- Hide quoted text -

 - Show quoted text -

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: watir does not click on button when specified

2010-01-05 Thread tester86

Selenium finds the button (here is the selenium)

//a...@id=tc676]/span/label

but it does not work in Watir?





On Jan 5, 4:23 pm, tester86 sagar.am...@gmail.com wrote:
 Hi

 I have the following watir code:

 $b.link(:href, javascript:;).click

 but it does not click on the button.

 a id=tc676 role=button href=javascript:;
 span class=button inner style=min-width: 80px;
 label class=sc-button ellipsisReset/label
 /span
 /a

 Does any one have any ideas?

 Thanks
-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general

[wtr-general] Driving Watir scripts in IE and Firefox at the same time

2010-01-04 Thread tester86
Hi

From my research as far as I understand you can not drive watir
scripts at the same time in the browser unless you create seperate
scripts for them. I have a Test::Unit script that runs in Firefox but
when I specify IE it just opens a new browser and nothing happens. I
am guess that I would have to write a different set of code for that.

example:

ie=Watir::IE.new
ie.goto(www.google.com)

ie=FireWatir.FireFox.new
ie.goto(www.google.com)

# then a code to perform search

When I run a script like this it only performs the search in Firefox
and not in IE. Is ther any solution to execute against both browsers.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Tables in Watir - Perform Verification Check

2009-12-15 Thread tester86
No the cell column already has the value I want to check to see if
that value is the same on the web page.

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Tables in Watir - Perform Verification Check

2009-12-14 Thread tester86
I have a table that has a sub class

td class = table x
tr
td class =Y
 td class =x90/td
/tr

I want to perform a validation check where it will read the data
between the tags and pass or fail depending on the value. I searched
the group and internet but could not see anything. Does anyone have
any ideas.

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Question for Watir Group

2009-12-08 Thread tester86
Hi,

This is more of a question:

Has anyone tried to use Zentest with there Test::Unit scripts on
Windows 7. If anyone has can they let me know there thoughts.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general


[wtr-general] Re: Watir Examples...Need Help

2009-11-20 Thread tester86

Hi -

I was looking into cucumber for a while, but I have thought about
developing an automation framework in Watir (Test::Unit::TestCase), I
saw the examples on the link that you mentioned above and they just
outline different ways to code in Watir. If I use Watir then hopefully
I can incoroparte other open source tools hopefully or maybe use RSpec
as well.

I have got scripts up and running with Watir(Test::Unit::TestCase) but
I want to perform extenisve validation usch as verify and check
contents but I want to know if there is a good documents I can look at
before hand.

On Nov 19, 2:26 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Hi!

 I think you need to decide what type of framework you want and that
 will dictate how you perform validations.  From some of your previous
 posts, it looks like you've started with Cucumber.  Are you sticking
 with Cucumber, or looking for a different framework?  You can find
 examples of various frameworks here:

 http://wiki.openqa.org/display/WTR/Examples

 Hope this helps!

 -Tiffany

 On Nov 19, 1:14 pm, tester86 sagar.am...@gmail.com wrote:



  I been through all the main websites with regards to watir commands,
  but I need some documention or something to verify data on a web page
  and return that value, do I have to include rspec.is there any
  good guides to watir apart from the 5 min quick example.- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Watir Examples...Need Help

2009-11-19 Thread tester86

I been through all the main websites with regards to watir commands,
but I need some documention or something to verify data on a web page
and return that value, do I have to include rspec.is there any
good guides to watir apart from the 5 min quick example.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] WatirRecorder

2009-11-19 Thread tester86

Can someone give me the link to where I can download the watirRecorder+
+...as on the homepage it is not there.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Watir Help

2009-11-12 Thread tester86

hahahahahhaha very funny, hire a private dectivtive,...I know that
the letter 'a' was missing before but after several reinstalls of ruby
I did not bother to apply the fix to put the letter 'a' back onbut
thanks for the comment.

On Nov 9, 3:15 pm, Ethan notet...@gmail.com wrote:
 Somebody seems to be stealing all of your letters 'a'. Watir needs these,
 otherwise it's just 'wtir', and lacking the 'application' part can't do
 anything. I suggest you hire a privte detective to track down where all of
 your 'a's are disappearing to. The police are no help with this sort of
 thing - they have no 'a' in their name, and don't care.



 On Mon, Nov 9, 2009 at 15:29, tester86 sagar.am...@gmail.com wrote:

  Using cucumber and watir - Vista and Windows 7

  Get the following error message:

       Unble to locte element, using :nme,
  q (Wtir::Exception::UnknownObjectException)
       ./fetures/step_definitions/serch_steps.rb:11:in `/I serch for
  (.*)/'fetures/serch.feture:8:in `When I serch for cucumber github'

  Then I should see BDD tht tlks to domin experts first nd code second
  # fet
  ures/step_definitions/serch_steps.rb:15

  Anyone have any basic watir scripts that I can use with cucumber- Hide 
  quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Hi,

When I try run any script I still get the following error message:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_ex
ists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObjectException)
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set' from script2.rb:6

Here is my script:

require 'watir'
ie = Watir::IE.new

ie.goto(http://www.google.com;)
sleep(10)
ie.text_field(:name,q).set(watir)
sleep(10)


Here is my other scripts:

#require 'rubygems'
require 'watir'

   # set a variable
   test_site = 'http://www.google.com'

   # open the IE browser
   ie = Watir::IE.new

   puts Step 1: go to the test site:  + test_site
   ie.goto(test_site)
   puts   Action: entered  + test_site +  in the address bar.

   puts Action: WaitForPageToLoad

   sleep(10)

   #puts Click on the Gmail Link

   #ie.link(id, '').click

   #puts Action: Enter InfoQ into text box
   ie.text_field(:name,q).set(watir)
   sleep(10)
   #puts Action: Click Search Button
   #ie.button(:name, btnG).click

As far as I know my script should be fine as I am following the watir
commans correctly but everytime I execute the script I get the error
mentioned above.

Thanks




On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:
 Hi,

 Please try to use slep(10) commands.

 It means

 ie.goto(htp://google.com)
 sleep(10)
 ie.text_field(:name,q).set(Raveendran)
 sleep(10)
 .
 .
 .
  I hope it works now. Rit ?





 On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote:

  Another Error From Command Prompt:

  ## Beginning of test: Google search
  Step 1: go to the test site:http://www.google.com
   Action: enteredhttp://www.google.comin the address bar.
  Action: WaitForPageToLoad
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_exists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObje
  ctException)
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:284:in `enabled?'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:56:in `assert_enabled'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements.rb:323:in `set'
          from script1.rb:28

  I never had any problems when I was using watir on windows xp, I am
  not 100% sure but is there any configuration for windows vista or any
  known issue because when using IE Developer Toolbar I am able to find
  the link q on the page

  On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote:
   Bret,

   My script is going to the google URL, but for some reason it cannot
   find the text box. I have tried all the examples but I get the
   following output:

   broswer.url
   browser.text
   script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0
   (NoMethodError)

   same for when I use ie.text_field(:name, q).set(pickaxe)

   Do you have any idea why it cannot find that text box?

   On Nov 10, 1:09 pm, Bret Pettichord b...@pettichord.com wrote:

My guess is that the browser is not actually on the google page at this
point. You could use statements like this to help troubleshoot:

  puts browser.text
  puts browser.url
  puts browser.title

Bret

tester86 wrote:
 Thanks for all the help I managed to get ruby and watir all up and
 running. But I have a question, when I was using cucumber I get this
 error message and they told me to put this post in the watir group:

 c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
 `assert_exists': Unable to locate element, using :name,
 q (Watir::Exception::UnknownObje
 ctException)
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:284:in `enabled?'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 element.rb:56:in `assert_enabled'
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
 input_elements.rb:323:in `set'
         from script1.rb:8

 When you have a watir script why cannot find the text box and the
 search box for google.My script is still the same. Is there some
  other
 syntax that I need to use?

--
Bret Pettichord
Lead Developer, Watir,www.watir.com
Blog,www.io.com/~wazmo/bloghttp://www.io.com/%7Ewazmo/blog
Twitter,www.twitter.com/bpettichord-Hidequoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -

 --
 Regards,
 P.Raveendranhttp://raveendran.wordpress.com- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General

[wtr-general] Watir IDE Recorder

2009-11-12 Thread tester86

Hi.

I went to download the watir ide recorder and it mentioned it
requires .net framework 1.4 and then I installed the .net framework.
Then I went to install watir ide recorder it told me again I need
the .net framwork but I hvae already installed it. I have done a
windows secuirty update, but still the set up is not working. Any
ideas...


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Thanks for you input Tiffany but when I run the script and execute in
IRB I get the following error message:

NameError: undefined local variable or method `ie' for main:Object

Is there something I have to set to intialize IE? On what operating
system did you execute the script since I have several installs of
ruby and watir and nothing is working for me.

When I execute the script it opens a new window, on that window
nothing happens, then it goes to my other window and loads up google
and throw the error message unable to find q then in IRB it shows me
this message. Do you have any idea on what is happening as I have been
through all the basic examples but none of my scripts are working,
even though they are very low level.

When I try to do ie.text_contains(valueX) if throws me back an error
stating undefined method for contains. Am I missing something in my
set up or is it because of vista OS?

Thanks

On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote:
 The error message is saying that it can't find the text field with the
 name 'q'.  For some reason, it doesn't exist in the browser contained
 by your variable ie.  Are you sure that your browser is on the page
 you think it is?

 One way to troubleshoot this is with an irb session.  Run your test
 and when it fails, open an irb session in a command prompt.  Then try
 the following commands:

 require 'watir'
 ie = Watir::IE.find(:title, /Google/)
 ie.text_field(:name,'q').exists?

 I've copied both of your scripts into an irb session and they ran
 without any problems - even without the sleep commands (you shouldn't
 need those).  Try stepping through your scripts, line by line in irb
 so you can watch what happens in with each step.

 Hope this helps,

 -Tiffany

 On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:



  Hi,

  When I try run any script I still get the following error message:

  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_ex
  ists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObjectException)
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:284:in `enabled?'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:56:in `assert_enabled'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements
  .rb:323:in `set' from script2.rb:6

  Here is my script:

  require 'watir'
  ie = Watir::IE.new

  ie.goto(http://www.google.com;)
  sleep(10)
  ie.text_field(:name,q).set(watir)
  sleep(10)

  Here is my other scripts:

  #require 'rubygems'
  require 'watir'

     # set a variable
     test_site = 'http://www.google.com'

     # open the IE browser
     ie = Watir::IE.new

     puts Step 1: go to the test site:  + test_site
     ie.goto(test_site)
     puts   Action: entered  + test_site +  in the address bar.

     puts Action: WaitForPageToLoad

     sleep(10)

     #puts Click on the Gmail Link

     #ie.link(id, '').click

     #puts Action: Enter InfoQ into text box
     ie.text_field(:name,q).set(watir)
     sleep(10)
     #puts Action: Click Search Button
     #ie.button(:name, btnG).click

  As far as I know my script should be fine as I am following the watir
  commans correctly but everytime I execute the script I get the error
  mentioned above.

  Thanks

  On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:

   Hi,

   Please try to use slep(10) commands.

   It means

   ie.goto(htp://google.com)
   sleep(10)
   ie.text_field(:name,q).set(Raveendran)
   sleep(10)
   .
   .
   .
    I hope it works now. Rit ?

   On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com wrote:

Another Error From Command Prompt:

## Beginning of test: Google search
Step 1: go to the test site:http://www.google.com
 Action: enteredhttp://www.google.comintheaddress bar.
Action: WaitForPageToLoad
c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObje
ctException)
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
       from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:323:in `set'
        from script1.rb:28

I never had any problems when I was using watir on windows xp, I am
not 100% sure but is there any configuration for windows vista or any
known issue because when using IE Developer Toolbar I am able to find
the link q on the page

On Nov 11, 12:49 pm, tester86 sagar.am...@gmail.com wrote:
 Bret,

 My script is going to the google URL, but for some reason it cannot
 find the text box. I have tried all the examples but I get the
 following output:

 broswer.url
 browser.text

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

When I type the commans into IRB here is was I get as output:

irb(main):001:0 require 'Watir'
= true
irb(main):002:0 test_site='www.google.com'
= www.google.com
irb(main):003:0 IE=Watir::IE.new
= #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08,
@pause_af
ter_wait=0.1, @error_checkers=[], @page_container=#Watir::IE:
0x3e09a40 ..., @a
ctiveObjectHighLightColor=yellow, @ole_object=nil,
@rexmlDomobject=nil, @logge
r=#Watir::DefaultLogger:0x3e033e8 @level=2,
@formatter=#Logger::SimpleFormatte
r:0x3e03244 @datetime_format=%d-%b-%Y %H:%M:%S,
@default_formatter=#Logger::
Formatter:0x3e03334 @datetime_format=nil, @progname=nil,
@logdev=#Logger::LogD
evice:0x3e032e4 @mutex=#Logger::LogDevice::LogDeviceMutex:0x3e03280
@mon_enteri
ng_queue=[], @mon_count=0, @mon_owner=nil, @mon_waiting_queue=[],
@dev=#IO:0x3
866ad4, @shift_size=nil, @shift_age=nil, @filename=nil,
@down_load_time=0.515
, @type_keys=true, @speed=:slow, @ie=#WIN32OLE:0x3e03460
irb(main):004:0 IE.goto(test_site)
= 0.234
irb(main):005:0 IE.text_field(:name,q).set(watir)
Watir::Exception::UnknownObjectException: Unable to locate element,
using :name,
 q
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:52:
in `assert_exists'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284
:in `enabled?'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:
in `assert_enabled'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set'
from (irb):5


But in my previous post I executed the script..which failed then
logged into IRB and it was at google.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Here is an output from IRB when I try to execute script line by line:

irb(main):001:0 require 'Watir'
= true
irb(main):002:0 test_site='www.google.com'
= www.google.com
irb(main):003:0 IE=Watir::IE.new
= #Watir::IE:0x3e09a40 @url_list=[about:blank], @typingspeed=0.08,
@pause_af
ter_wait=0.1, @error_checkers=[], @page_container=#Watir::IE:
0x3e09a40 ..., @a
ctiveObjectHighLightColor=yellow, @ole_object=nil,
@rexmlDomobject=nil, @logge
r=#Watir::DefaultLogger:0x3e033e8 @level=2,
@formatter=#Logger::SimpleFormatte
r:0x3e03244 @datetime_format=%d-%b-%Y %H:%M:%S,
@default_formatter=#Logger::
Formatter:0x3e03334 @datetime_format=nil, @progname=nil,
@logdev=#Logger::LogD
evice:0x3e032e4 @mutex=#Logger::LogDevice::LogDeviceMutex:0x3e03280
@mon_enteri
ng_queue=[], @mon_count=0, @mon_owner=nil, @mon_waiting_queue=[],
@dev=#IO:0x3
866ad4, @shift_size=nil, @shift_age=nil, @filename=nil,
@down_load_time=0.515
, @type_keys=true, @speed=:slow, @ie=#WIN32OLE:0x3e03460
irb(main):004:0 IE.goto(test_site)
= 0.234
irb(main):005:0 IE.text_field(:name,q).set(watir)
Watir::Exception::UnknownObjectException: Unable to locate element,
using :name,
 q
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:52:
in `assert_exists'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284
:in `enabled?'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:
in `assert_enabled'
from C:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set'
from (irb):5

On Nov 12, 12:47 pm, tester86 sagar.am...@gmail.com wrote:
 Thanks for you input Tiffany but when I run the script and execute in
 IRB I get the following error message:

 NameError: undefined local variable or method `ie' for main:Object

 Is there something I have to set to intialize IE? On what operating
 system did you execute the script since I have several installs of
 ruby and watir and nothing is working for me.

 When I execute the script it opens a new window, on that window
 nothing happens, then it goes to my other window and loads up google
 and throw the error message unable to find q then in IRB it shows me
 this message. Do you have any idea on what is happening as I have been
 through all the basic examples but none of my scripts are working,
 even though they are very low level.

 When I try to do ie.text_contains(valueX) if throws me back an error
 stating undefined method for contains. Am I missing something in my
 set up or is it because of vista OS?

 Thanks

 On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote:



  The error message is saying that it can't find the text field with the
  name 'q'.  For some reason, it doesn't exist in the browser contained
  by your variable ie.  Are you sure that your browser is on the page
  you think it is?

  One way to troubleshoot this is with an irb session.  Run your test
  and when it fails, open an irb session in a command prompt.  Then try
  the following commands:

  require 'watir'
  ie = Watir::IE.find(:title, /Google/)
  ie.text_field(:name,'q').exists?

  I've copied both of your scripts into an irb session and they ran
  without any problems - even without the sleep commands (you shouldn't
  need those).  Try stepping through your scripts, line by line in irb
  so you can watch what happens in with each step.

  Hope this helps,

  -Tiffany

  On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:

   Hi,

   When I try run any script I still get the following error message:

   c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
   `assert_ex
   ists': Unable to locate element, using :name,
   q (Watir::Exception::UnknownObjectException)
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:284:in `enabled?'
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   element.rb:56:in `assert_enabled'
           from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
   input_elements
   .rb:323:in `set' from script2.rb:6

   Here is my script:

   require 'watir'
   ie = Watir::IE.new

   ie.goto(http://www.google.com;)
   sleep(10)
   ie.text_field(:name,q).set(watir)
   sleep(10)

   Here is my other scripts:

   #require 'rubygems'
   require 'watir'

      # set a variable
      test_site = 'http://www.google.com'

      # open the IE browser
      ie = Watir::IE.new

      puts Step 1: go to the test site:  + test_site
      ie.goto(test_site)
      puts   Action: entered  + test_site +  in the address bar.

      puts Action: WaitForPageToLoad

      sleep(10)

      #puts Click on the Gmail Link

      #ie.link(id, '').click

      #puts Action: Enter InfoQ into text box
      ie.text_field(:name,q).set(watir)
      sleep(10)
      #puts Action: Click Search Button
      #ie.button(:name, btnG).click

   As far as I know my script should be fine as I am following the watir
   commans correctly but everytime I

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-12 Thread tester86

Thanks for your help! It turn out that Bill's helped actually helped
me out. I have to run command prompt as administrator. My script is
now running finally after two days of debugging watir.

Thanks for all your help!



On Nov 12, 1:55 pm, Tiffany Fodor tcfo...@comcast.net wrote:
 Are you running your command prompt session with administrator
 privileges?  I had a problem when I moved to Vista where two browsers
 were being opened.  Try the suggestions Bill Agee gave me:

 http://tinyurl.com/ygn4fpx

 Hope this helps!

 -Tiffany

 On Nov 12, 11:47 am, tester86 sagar.am...@gmail.com wrote:



  Thanks for you input Tiffany but when I run the script and execute in
  IRB I get the following error message:

  NameError: undefined local variable or method `ie' for main:Object

  Is there something I have to set to intialize IE? On what operating
  system did you execute the script since I have several installs of
  ruby and watir and nothing is working for me.

  When I execute the script it opens a new window, on that window
  nothing happens, then it goes to my other window and loads up google
  and throw the error message unable to find q then in IRB it shows me
  this message. Do you have any idea on what is happening as I have been
  through all the basic examples but none of my scripts are working,
  even though they are very low level.

  When I try to do ie.text_contains(valueX) if throws me back an error
  stating undefined method for contains. Am I missing something in my
  set up or is it because of vista OS?

  Thanks

  On Nov 12, 11:47 am, Tiffany Fodor tcfo...@comcast.net wrote:

   The error message is saying that it can't find the text field with the
   name 'q'.  For some reason, it doesn't exist in the browser contained
   by your variable ie.  Are you sure that your browser is on the page
   you think it is?

   One way to troubleshoot this is with an irb session.  Run your test
   and when it fails, open an irb session in a command prompt.  Then try
   the following commands:

   require 'watir'
   ie = Watir::IE.find(:title, /Google/)
   ie.text_field(:name,'q').exists?

   I've copied both of your scripts into an irb session and they ran
   without any problems - even without the sleep commands (you shouldn't
   need those).  Try stepping through your scripts, line by line in irb
   so you can watch what happens in with each step.

   Hope this helps,

   -Tiffany

   On Nov 12, 7:42 am, tester86 sagar.am...@gmail.com wrote:

Hi,

When I try run any script I still get the following error message:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_ex
ists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObjectException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements
.rb:323:in `set' from script2.rb:6

Here is my script:

require 'watir'
ie = Watir::IE.new

ie.goto(http://www.google.com;)
sleep(10)
ie.text_field(:name,q).set(watir)
sleep(10)

Here is my other scripts:

#require 'rubygems'
require 'watir'

   # set a variable
   test_site = 'http://www.google.com'

   # open the IE browser
   ie = Watir::IE.new

   puts Step 1: go to the test site:  + test_site
   ie.goto(test_site)
   puts   Action: entered  + test_site +  in the address bar.

   puts Action: WaitForPageToLoad

   sleep(10)

   #puts Click on the Gmail Link

   #ie.link(id, '').click

   #puts Action: Enter InfoQ into text box
   ie.text_field(:name,q).set(watir)
   sleep(10)
   #puts Action: Click Search Button
   #ie.button(:name, btnG).click

As far as I know my script should be fine as I am following the watir
commans correctly but everytime I execute the script I get the error
mentioned above.

Thanks

On Nov 11, 6:13 pm, Raveendran P jazzezr...@gmail.com wrote:

 Hi,

 Please try to use slep(10) commands.

 It means

 ie.goto(htp://google.com)
 sleep(10)
 ie.text_field(:name,q).set(Raveendran)
 sleep(10)
 .
 .
 .
  I hope it works now. Rit ?

 On Thu, Nov 12, 2009 at 12:48 AM, tester86 sagar.am...@gmail.com 
 wrote:

  Another Error From Command Prompt:

  ## Beginning of test: Google search
  Step 1: go to the test site:http://www.google.com
   Action: enteredhttp://www.google.comintheaddressbar.
  Action: WaitForPageToLoad
  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_exists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObje
  ctException)
         from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-11 Thread tester86

Bret,

My script is going to the google URL, but for some reason it cannot
find the text box. I have tried all the examples but I get the
following output:

broswer.url
browser.text
script1.rb:9: undefined method `enter_text' for #Watir::IE:0x8b291e0
(NoMethodError)

same for when I use ie.text_field(:name, q).set(pickaxe)

Do you have any idea why it cannot find that text box?

On Nov 10, 1:09 pm, Bret Pettichord b...@pettichord.com wrote:
 My guess is that the browser is not actually on the google page at this
 point. You could use statements like this to help troubleshoot:

   puts browser.text
   puts browser.url
   puts browser.title

 Bret





 tester86 wrote:
  Thanks for all the help I managed to get ruby and watir all up and
  running. But I have a question, when I was using cucumber I get this
  error message and they told me to put this post in the watir group:

  c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
  `assert_exists': Unable to locate element, using :name,
  q (Watir::Exception::UnknownObje
  ctException)
        from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:284:in `enabled?'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  element.rb:56:in `assert_enabled'
          from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
  input_elements.rb:323:in `set'
          from script1.rb:8

  When you have a watir script why cannot find the text box and the
  search box for google.My script is still the same. Is there some other
  syntax that I need to use?

 --
 Bret Pettichord
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/blog
 Twitter,www.twitter.com/bpettichord- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] RUBY- UNDEFINED METHODS FOR EVERYTHING

2009-11-11 Thread tester86

I keep on seeing the following error everything I try to perform an
verifcation check or find a text box on the page and enter in text:


undefined method `contains' for #Watir::IE:0x89684c8 (NoMethodError)

Can someone please explain why I am getting these errors. Even when I
try to run a sample script from the Internet it does not work.. Can
someone please explain what going on is it vista or am I missing a
gem
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

I removed include Watir now my script is:

require 'watir'
require 'rubygems'
#require win32ole


ie = Watir::IE.new
ie.goto(http://google.com;)

ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).click


I still get the same error message. I am using watir 1.4.1. Below is
my ruby version

C:\rubyruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

I have done gem update prevsiously, gem system updates but nothing
works. Any ideas on what I can do to get a basic script up and running
using watir?


On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:
 Hi,

 Add first line -- require 'rubygems'
 Remove line no.2 -- include Watir

 I hope it works now. If its not working then Please provide more details
 about Watir Verison and Ruby version.

 Thanks





 On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote:

  I am trying to run a watir script:

  require 'watir'
  include Watir

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).submit

  when I run it from command line ruby filename.rb I get the following
  error message:

  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
  unknown proper
  ty or method `document' (WIN32OLERuntimeError)
     HRESULT error code:0x800706ba
       The RPC server is unavailable.    from c:/ruby/lib/ruby/
  site_ruby/1.8/watir.rb:1336:in `document'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
  `getContainerContents'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
  `getObject'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
  `initialize'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
  `text_field'
         from script1.rb:6

  Any Ideas.?

 --
 Regards,
 P.Raveendranhttp://raveendran.wordpress.com- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

watir 1.4.1

On Nov 9, 9:46 pm, Bret Pettichord b...@pettichord.com wrote:
 What version of Watir are you using?





 tester86 wrote:
  I am trying to run a watir script:

  require 'watir'
  include Watir

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).submit

  when I run it from command line ruby filename.rb I get the following
  error message:

  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
  unknown proper
  ty or method `document' (WIN32OLERuntimeError)
      HRESULT error code:0x800706ba
        The RPC server is unavailable.    from c:/ruby/lib/ruby/
  site_ruby/1.8/watir.rb:1336:in `document'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
  `getContainerContents'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
  `getObject'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
  `initialize'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
  `text_field'
          from script1.rb:6

  Any Ideas.?

 --
 Bret Pettichord
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/blog
 Twitter,www.twitter.com/bpettichord- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] IRB Console

2009-11-10 Thread tester86

In IRB I get the following message and according to Watir In 5 Minutes
Im guessing my output is incorrect..

irb(main):001:0 require watir
= true
irb(main):002:0 ie = Watir::IE.new
= #Watir::IE:0x825f690 @ie=#WIN32OLE:0x825f640, @error_checkers=
[#Proc:0x0830d...@c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1135],
@logger=#Watir::DefaultLogger:0x825f5f0 @level=2, @progname=nil,
@logdev=#Logger::LogDevice:0x825f58c @shift_size=nil,
@shift_age=nil,@filename=nil,
@mutex=#Logger::LogDevice::LogDeviceMutex:0x825f564 @mon_owner=nil,
@mon_waiting_queue=[], @mon_entering_queue=[], @mon_count=0,
@dev=#IO:0x7916ad4, @formatter=nil,
@default_formatter=#Logger::Formatter:0x825f5b4 @datetime_format=%d-
%b-%Y %H:%M:%S, @defaultSleepTime=0.1,
@activeObjectHighLightColor=yellow, @enable_spinner=false,
@url_list=
[], @typingspeed=0.08, @form=nil
irb(main):003:0

So from my debugging have I set Watir up incorrectly... since my IRB
output is incorrect. Can someone please point me in the right
direction.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

Here is the list of my local gems (just incase its helps)

*** LOCAL GEMS ***

actionmailer (2.3.4)
actionpack (2.3.4)
activerecord (2.3.4)
activeresource (2.3.4)
activesupport (2.3.4)
builder (2.1.2)
camping (1.5.180)
commonwatir (1.6.2)
cucumber (0.4.3)
diff-lcs (1.1.2)
firewatir (1.6.2)
fxri (0.3.7, 0.3.6)
fxruby (1.6.19, 1.6.12)
hoe (2.3.3)
hoe-seattlerb (1.2.1)
hpricot (0.8.2, 0.6)
json_pure (1.1.9)
log4r (1.1.2, 1.0.5)
markaby (0.5)
metaid (1.0)
minitest (1.4.2)
polyglot (0.2.9)
rack (1.0.1)
rails (2.3.4)
rake (0.8.7, 0.7.3)
rspec (1.2.9)
rubyforge (2.0.3)
rubygems-update (1.3.5)
s4t-utils (1.0.4)
session (2.4.0)
sources (0.0.1)
term-ansicolor (1.0.4)
test-spec (0.10.0)
treetop (1.4.2)
user-choices (1.1.6)
watir (1.6.2)
win32-api (1.4.5, 1.0.4)
win32-clipboard (0.5.2, 0.4.3)
win32-dir (0.3.5, 0.3.2)
win32-eventlog (0.5.2, 0.4.6)
win32-file (0.6.3, 0.5.4)
win32-file-stat (1.3.4, 1.2.7)
win32-process (0.6.1, 0.5.3)
win32-sapi (0.1.5, 0.1.4)
win32-sound (0.4.2, 0.4.1)
win32console (1.2.0)
win32ole-pp (1.2.0)
windows-api (0.4.0, 0.2.0)
windows-pr (1.0.8, 0.7.2)
xml-simple (1.0.12)

Is there any gem that I am missing that is causing the error?

On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
 I removed include Watir now my script is:

 require 'watir'
 require 'rubygems'
 #require win32ole

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click

 I still get the same error message. I am using watir 1.4.1. Below is
 my ruby version

 C:\rubyruby --version
 ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

 I have done gem update prevsiously, gem system updates but nothing
 works. Any ideas on what I can do to get a basic script up and running
 using watir?

 On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:



  Hi,

  Add first line -- require 'rubygems'
  Remove line no.2 -- include Watir

  I hope it works now. If its not working then Please provide more details
  about Watir Verison and Ruby version.

  Thanks

  On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com wrote:

   I am trying to run a watir script:

   require 'watir'
   include Watir

   ie = Watir::IE.new
   ie.goto(http://google.com;)

   ie.text_field(:name, q).set(watir)
   ie.button(:name, btnG).submit

   when I run it from command line ruby filename.rb I get the following
   error message:

   c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
   unknown proper
   ty or method `document' (WIN32OLERuntimeError)
      HRESULT error code:0x800706ba
        The RPC server is unavailable.    from c:/ruby/lib/ruby/
   site_ruby/1.8/watir.rb:1336:in `document'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
   `getContainerContents'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
   `getObject'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
   `initialize'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
          from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
   `text_field'
          from script1.rb:6

   Any Ideas.?

  --
  Regards,
  P.Raveendranhttp://raveendran.wordpress.com-Hide quoted text -

  - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

This morning I just upgraded to watir 1.6.2 and I also switched the
lines but I still got the same output.

On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
wrote:
 In a previous email, you indicate that you're running Watir 1.4.1.  But, the
 below indicates that you're on 1.6.2.

 In any case, I tried running your code and it worked fine. (What happens if
 you switch the require 'watir' and require 'rubygems' lines? Could that be
 the source of your problem? Further, do you have the variable RUBYOPT set in
 your environment variables with the value of 'rubygems'?)

 That is:
 require 'watir'
 require 'rubygems'
 #require win32ole

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).click



 On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:

  Here is the list of my local gems (just incase its helps)

  *** LOCAL GEMS ***

  actionmailer (2.3.4)
  actionpack (2.3.4)
  activerecord (2.3.4)
  activeresource (2.3.4)
  activesupport (2.3.4)
  builder (2.1.2)
  camping (1.5.180)
  commonwatir (1.6.2)
  cucumber (0.4.3)
  diff-lcs (1.1.2)
  firewatir (1.6.2)
  fxri (0.3.7, 0.3.6)
  fxruby (1.6.19, 1.6.12)
  hoe (2.3.3)
  hoe-seattlerb (1.2.1)
  hpricot (0.8.2, 0.6)
  json_pure (1.1.9)
  log4r (1.1.2, 1.0.5)
  markaby (0.5)
  metaid (1.0)
  minitest (1.4.2)
  polyglot (0.2.9)
  rack (1.0.1)
  rails (2.3.4)
  rake (0.8.7, 0.7.3)
  rspec (1.2.9)
  rubyforge (2.0.3)
  rubygems-update (1.3.5)
  s4t-utils (1.0.4)
  session (2.4.0)
  sources (0.0.1)
  term-ansicolor (1.0.4)
  test-spec (0.10.0)
  treetop (1.4.2)
  user-choices (1.1.6)
  watir (1.6.2)
  win32-api (1.4.5, 1.0.4)
  win32-clipboard (0.5.2, 0.4.3)
  win32-dir (0.3.5, 0.3.2)
  win32-eventlog (0.5.2, 0.4.6)
  win32-file (0.6.3, 0.5.4)
  win32-file-stat (1.3.4, 1.2.7)
  win32-process (0.6.1, 0.5.3)
  win32-sapi (0.1.5, 0.1.4)
  win32-sound (0.4.2, 0.4.1)
  win32console (1.2.0)
  win32ole-pp (1.2.0)
  windows-api (0.4.0, 0.2.0)
  windows-pr (1.0.8, 0.7.2)
  xml-simple (1.0.12)

  Is there any gem that I am missing that is causing the error?

  On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:
   I removed include Watir now my script is:

   require 'watir'
   require 'rubygems'
   #require win32ole

   ie = Watir::IE.new
   ie.goto(http://google.com;)

   ie.text_field(:name, q).set(watir)
   ie.button(:name, btnG).click

   I still get the same error message. I am using watir 1.4.1. Below is
   my ruby version

   C:\rubyruby --version
   ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

   I have done gem update prevsiously, gem system updates but nothing
   works. Any ideas on what I can do to get a basic script up and running
   using watir?

   On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:

Hi,

Add first line -- require 'rubygems'
Remove line no.2 -- include Watir

I hope it works now. If its not working then Please provide more
  details
about Watir Verison and Ruby version.

Thanks

On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com
  wrote:

 I am trying to run a watir script:

 require 'watir'
 include Watir

 ie = Watir::IE.new
 ie.goto(http://google.com;)

 ie.text_field(:name, q).set(watir)
 ie.button(:name, btnG).submit

 when I run it from command line ruby filename.rb I get the following
 error message:

 c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
 unknown proper
 ty or method `document' (WIN32OLERuntimeError)
    HRESULT error code:0x800706ba
      The RPC server is unavailable.    from c:/ruby/lib/ruby/
 site_ruby/1.8/watir.rb:1336:in `document'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
 `getContainerContents'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
 `getObject'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
 `initialize'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
        from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
 `text_field'
        from script1.rb:6

 Any Ideas.?

--
Regards,
P.Raveendranhttp://raveendran.wordpress.com-Hidequoted text -

- Show quoted text -- Hide quoted text -

   - Show quoted text -- Hide quoted text -

 - Show quoted text -
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

Previously, I did instal watir via the gem version 1.4.1 then
yesterday I download watir according to some material I found  online.
This morning I upgraded to watir 1.6.2. and executed my script again
but I got the same error message. Do you think I should uninstall ruby
and that will remove all my gems and everything and start again..I
did that before but it did not work.

On Nov 10, 9:03 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Tue, Nov 10, 2009 at 3:10 PM, tester86 sagar.am...@gmail.com wrote:
  watir 1.4.1

 Please uninstall it and install watir via gem. Ask if you need help with
 that.

 Željko
 --
 watir.com - community manager
 watirpodcast.com - host
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

I do not think that it is a permission an issue and I am using windows
vista but going to be working on windows 7 soon. I do not know how to
get a stack trace from my output. In my previous posts shows the error
message that I get in command prompt.

Question:

1. How do I check my envirnoment variables for ruby?


On Nov 10, 9:38 am, Bret Pettichord b...@pettichord.com wrote:
 I am wondering if maybe this is a permissions problem. Are you using
 Windows 7?

 It would help if you printed the error and stack trace that you are now
 getting.

 Bret





 tester86 wrote:
  This morning I just upgraded to watir 1.6.2 and I also switched the
  lines but I still got the same output.

  On Nov 10, 9:00 am, Jason Trebilcock jason.trebilc...@gmail.com
  wrote:

  In a previous email, you indicate that you're running Watir 1.4.1.  But, 
  the
  below indicates that you're on 1.6.2.

  In any case, I tried running your code and it worked fine. (What happens if
  you switch the require 'watir' and require 'rubygems' lines? Could that be
  the source of your problem? Further, do you have the variable RUBYOPT set 
  in
  your environment variables with the value of 'rubygems'?)

  That is:
  require 'watir'
  require 'rubygems'
  #require win32ole

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).click

  On Tue, Nov 10, 2009 at 8:42 AM, tester86 sagar.am...@gmail.com wrote:

  Here is the list of my local gems (just incase its helps)

  *** LOCAL GEMS ***

  actionmailer (2.3.4)
  actionpack (2.3.4)
  activerecord (2.3.4)
  activeresource (2.3.4)
  activesupport (2.3.4)
  builder (2.1.2)
  camping (1.5.180)
  commonwatir (1.6.2)
  cucumber (0.4.3)
  diff-lcs (1.1.2)
  firewatir (1.6.2)
  fxri (0.3.7, 0.3.6)
  fxruby (1.6.19, 1.6.12)
  hoe (2.3.3)
  hoe-seattlerb (1.2.1)
  hpricot (0.8.2, 0.6)
  json_pure (1.1.9)
  log4r (1.1.2, 1.0.5)
  markaby (0.5)
  metaid (1.0)
  minitest (1.4.2)
  polyglot (0.2.9)
  rack (1.0.1)
  rails (2.3.4)
  rake (0.8.7, 0.7.3)
  rspec (1.2.9)
  rubyforge (2.0.3)
  rubygems-update (1.3.5)
  s4t-utils (1.0.4)
  session (2.4.0)
  sources (0.0.1)
  term-ansicolor (1.0.4)
  test-spec (0.10.0)
  treetop (1.4.2)
  user-choices (1.1.6)
  watir (1.6.2)
  win32-api (1.4.5, 1.0.4)
  win32-clipboard (0.5.2, 0.4.3)
  win32-dir (0.3.5, 0.3.2)
  win32-eventlog (0.5.2, 0.4.6)
  win32-file (0.6.3, 0.5.4)
  win32-file-stat (1.3.4, 1.2.7)
  win32-process (0.6.1, 0.5.3)
  win32-sapi (0.1.5, 0.1.4)
  win32-sound (0.4.2, 0.4.1)
  win32console (1.2.0)
  win32ole-pp (1.2.0)
  windows-api (0.4.0, 0.2.0)
  windows-pr (1.0.8, 0.7.2)
  xml-simple (1.0.12)

  Is there any gem that I am missing that is causing the error?

  On Nov 10, 8:10 am, tester86 sagar.am...@gmail.com wrote:

  I removed include Watir now my script is:

  require 'watir'
  require 'rubygems'
  #require win32ole

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).click

  I still get the same error message. I am using watir 1.4.1. Below is
  my ruby version

  C:\rubyruby --version
  ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

  I have done gem update prevsiously, gem system updates but nothing
  works. Any ideas on what I can do to get a basic script up and running
  using watir?

  On Nov 9, 10:52 pm, Raveendran P jazzezr...@gmail.com wrote:

  Hi,

  Add first line -- require 'rubygems'
  Remove line no.2 -- include Watir

  I hope it works now. If its not working then Please provide more

  details

  about Watir Verison and Ruby version.

  Thanks

  On Tue, Nov 10, 2009 at 3:19 AM, tester86 sagar.am...@gmail.com

  wrote:

  I am trying to run a watir script:

  require 'watir'
  include Watir

  ie = Watir::IE.new
  ie.goto(http://google.com;)

  ie.text_field(:name, q).set(watir)
  ie.button(:name, btnG).submit

  when I run it from command line ruby filename.rb I get the following
  error message:

  c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
  unknown proper
  ty or method `document' (WIN32OLERuntimeError)
     HRESULT error code:0x800706ba
       The RPC server is unavailable.    from c:/ruby/lib/ruby/
  site_ruby/1.8/watir.rb:1336:in `document'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
  `getContainerContents'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
  `getObject'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
  `initialize'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
         from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
  `text_field'
         from script1.rb:6

  Any Ideas.?

  --
  Regards,
  P.Raveendranhttp://raveendran.wordpress.com-Hidequotedtext -

  - Show quoted text -- Hide quoted text -

  - Show quoted text -- Hide quoted text -

  - Show quoted text -

 --
 Bret Pettichord
 Lead Developer, Watir,www.watir.com
 Blog,www.io.com/~wazmo/blog
 Twitter,www.twitter.com/bpettichord

[wtr-general] Re: Really....Ruby + Watir + Command Line

2009-11-10 Thread tester86

Thanks for all the help I managed to get ruby and watir all up and
running. But I have a question, when I was using cucumber I get this
error message and they told me to put this post in the watir group:

c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/element.rb:52:in
`assert_exists': Unable to locate element, using :name,
q (Watir::Exception::UnknownObje
ctException)
  from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:284:in `enabled?'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
element.rb:56:in `assert_enabled'
from c:/ruby/lib/ruby/gems/1.8/gems/watir-1.6.2/lib/watir/
input_elements.rb:323:in `set'
from script1.rb:8

When you have a watir script why cannot find the text box and the
search box for google.My script is still the same. Is there some other
syntax that I need to use?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Watir Help

2009-11-09 Thread tester86

Using cucumber and watir - Vista and Windows 7

Get the following error message:

  Unble to locte element, using :nme,
q (Wtir::Exception::UnknownObjectException)
  ./fetures/step_definitions/serch_steps.rb:11:in `/I serch for
(.*)/'fetures/serch.feture:8:in `When I serch for cucumber github'

Then I should see BDD tht tlks to domin experts first nd code second
# fet
ures/step_definitions/serch_steps.rb:15

Anyone have any basic watir scripts that I can use with cucumber

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---



[wtr-general] Really....Ruby + Watir + Command Line

2009-11-09 Thread tester86

I am trying to run a watir script:

require 'watir'
include Watir

ie = Watir::IE.new
ie.goto(http://google.com;)

ie.text_field(:name, q).set(watir)
ie.button(:name, btnG).submit

when I run it from command line ruby filename.rb I get the following
error message:

c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:1336:in `method_missing':
unknown proper
ty or method `document' (WIN32OLERuntimeError)
HRESULT error code:0x800706ba
  The RPC server is unavailable.from c:/ruby/lib/ruby/
site_ruby/1.8/watir.rb:1336:in `document'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:754:in
`getContainerContents'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:778:in
`getObject'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:3225:in
`initialize'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in `new'
from c:/ruby/lib/ruby/site_ruby/1.8/watir.rb:367:in
`text_field'
from script1.rb:6

Any Ideas.?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Watir General group.
To post to this group, send email to watir-general@googlegroups.com
Before posting, please read the following guidelines: 
http://wiki.openqa.org/display/WTR/Support
To unsubscribe from this group, send email to 
watir-general-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/watir-general
-~--~~~~--~~--~--~---