Re: [wtr-general] Re: Install fails: s4t-utils-1.0.4 has an invalid value for @cert_chain

2011-04-12 Thread Željko Filipin
Try updating to new rubygems, it should fix the problem.

Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com - host
viaqa.mobi conference on software testing - organizer

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


Re: [wtr-general] Re: Managing multiple version of Watir

2011-04-12 Thread Željko Filipin
On Tue, Apr 5, 2011 at 11:40 AM, Darryl Brown d-l-br...@roadrunner.com
wrote:
 Thanks for pointing out that RVM won't fly on a
 windows box.

I suggest that you use gem 'watir', '1.6.2' as Ethan suggested, but there
is something similar to rvm for windows:

https://github.com/vertiginous/pik

Željko

-- 
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: How to 'click' row from table returned by AJAX-helper at google.com?

2011-04-12 Thread Sergey Erokhin
browser.row(:class = 'gac_a', :index= 2).click
work for me in IE

On Apr 10, 5:24 pm, Vitaliy Smok 4sm...@gmail.com wrote:
 No, result is the same - autosuggestions hided. No search.

 irb(main):104:0 browser.tr(:class = 'gac_a', :index= 2).click
 = []

 require rubygems
 require watir-webdriver

 browser = Watir::Browser.new(:firefox)
 browser.goto(http://www.google.com;)
 browser.text_field(:name = q).set 1
 browser.tr(:class = 'gac_a', :index= 2).click

 2011/4/10 Tim Koopmans tim.ko...@gmail.com







  Click on the table row instead, and use the :index attribute

  e.g.

  browser.tr(:class = 'gac_a', :index= 2).click

  will click the third row of the auto suggestions ...

  On Sat, Apr 9, 2011 at 6:40 PM, Vitaliy Smok 4sm...@gmail.com wrote:

  Hi!
   I'm study using of Watir at Ruby. At main page (www.google.com) when
  you entering something AJAX-helper gives you 10 variants of search queries,
  and you can click at any of them to get immediately search results. That
  helper is just table and you can access its elements by 
  browser.table(:class
  = 'gac_m')[X]. For example, text of element::
   browser.table(:class = 'gac_m')[3].text
  = 1 \320\272\320\262\321\226\321\202\320\275\321\217

  Here example how I'm doing now:

  require rubygems
  require watir-webdriver

  browser = Watir::Browser.new(:firefox)
  browser.goto(http://www.google.com;)
  browser.text_field(:name = q).set 1
  browser.text_field(:name = q).set browser.table(:class =
  'gac_m')[3].text
  browser.button(:name = btnG).click

  But I'm wondering how i can click it from Watir to simulate real user
  actions:

  irb(main):182:0 browser.table(:class = 'gac_m')[3].click
  = []

  and nothing happens, so I'm doing something wrong, may you advice?

  system: Ruby1.87WindowsXPFireFox 4

  --
  Before posting, please readhttp://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

   --
  Before posting, please readhttp://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

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


Fwd: [wtr-general] How to 'click' row from table returned by AJAX-helper at google.com?

2011-04-12 Thread Vitaliy Smok
-- Forwarded message --
From: Vitaliy Smok 4sm...@gmail.com
Date: 2011/4/11
Subject: Re: [wtr-general] How to 'click' row from table returned by
AJAX-helper at google.com?
To: Tim Koopmans tim.ko...@gmail.com


Hi!
 It's a bit strange thing. And looks like some sort of bug.

 At home i have FireFox 4 - i'm starting 'interactive Ruby' and just paste
to it follow commands:

require rubygems
 require watir-webdriver
 browser = Watir::Browser.new(:firefox)
 browser.goto(http://www.google.com;)
 browser.text_field(:name = q).set 1
 browser.tr(:class = 'gac_a', :index= 2).click


When i set '1' - there appear autosuggestions, but when i try to click (
browser.tr(:class = 'gac_a', :index= 2).click ) it just disappears and
there remain '1' at search string and no auto-suggestion.
Now at other machine i had install FireFox 3.6.16. The *same* *works *there
like charm.

But at FF3 there's other problem:

 require rubygems
 require watir-webdriver

 browser = Watir::Browser.new(:firefox)
 browser.goto(http://www.google.com;)
 browser.text_field(:name = q).set Hello World!
 browser.button(:name = btnG).click  OR  browser.button(:class =
 lsb).click OR browser.button(:index = 1).click


This code at the end must get search by keywords Hello World!. Right? But
it somewhy searches by 'hello world php'  ^__^
By FireFox4 it searches exactly 'Hello World!'.
i found that browser.button(:index = 2).click does search with keywords
'Hello World!'.



2011/4/10 Tim Koopmans tim.ko...@gmail.com

 Don't know. Works for me. Please articulate what is the problem exactly?

 Regards,
 Tim

 Sent from my mobile ...


 On 10/04/2011, at 7:24 AM, Vitaliy Smok 4sm...@gmail.com wrote:

 No, result is the same - autosuggestions hided. No search.

 irb(main):104:0 http://browser.trbrowser.tr(:class = 'gac_a', :index=
 2).click
 = []

 require rubygems
 require watir-webdriver

 browser = Watir::Browser.new(:firefox)
 browser.goto( http://www.google.comhttp://www.google.com;)
 browser.text_field(:name = q).set 1
 http://browser.trbrowser.tr(:class = 'gac_a', :index= 2).click


 2011/4/10 Tim Koopmans  tim.ko...@gmail.comtim.ko...@gmail.com

 Click on the table row instead, and use the :index attribute

 e.g.

 http://browser.trbrowser.tr(:class = 'gac_a', :index= 2).click

 will click the third row of the auto suggestions ...



 On Sat, Apr 9, 2011 at 6:40 PM, Vitaliy Smok  4sm...@gmail.com
 4sm...@gmail.com wrote:

 Hi!
  I'm study using of Watir at Ruby. At main page (
 http://www.google.comwww.google.com ) when you entering something
 AJAX-helper gives you 10 variants of search queries, and you can click at
 any of them to get immediately search results. That helper is just table and
 you can access its elements by browser.table(:class = 'gac_m')[X]. For
 example, text of element::
  browser.table(:class = 'gac_m')[3].text
 = 1 \320\272\320\262\321\226\321\202\320\275\321\217

 Here example how I'm doing now:

 require rubygems
 require watir-webdriver

 browser = Watir::Browser.new(:firefox)
 browser.goto( http://www.google.comhttp://www.google.com;)
 browser.text_field(:name = q).set 1
 browser.text_field(:name = q).set browser.table(:class =
 'gac_m')[3].text
 browser.button(:name = btnG).click




 But I'm wondering how i can click it from Watir to simulate real user
 actions:

 irb(main):182:0 browser.table(:class = 'gac_m')[3].click
 = []

 and nothing happens, so I'm doing something wrong, may you advice?


 system: Ruby1.87WindowsXPFireFox 4

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

  watir-general@googlegroups.comwatir-general@googlegroups.com
  http://groups.google.com/group/watir-general
 http://groups.google.com/group/watir-general
  watir-general%2bunsubscr...@googlegroups.com
 watir-general+unsubscr...@googlegroups.com


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

  watir-general@googlegroups.comwatir-general@googlegroups.com
  http://groups.google.com/group/watir-general
 http://groups.google.com/group/watir-general
  watir-general%2bunsubscr...@googlegroups.com
 watir-general+unsubscr...@googlegroups.com




-- 
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: how to change value of Watir::Input?

2011-04-12 Thread Tiffany Fodor
Thanks Jari!

I guess I'd better learn more about Watir-Webdriver soon!

-Tiffany

On Apr 10, 11:32 pm, Jari Bakken jari.bak...@gmail.com wrote:
 On Fri, Apr 8, 2011 at 12:54 PM, bryan rasmussen.br...@gmail.com wrote:
  Hi,

  If I have an element of type Watir:Input how should I set the value -
  I would like to not use textfield (unless there is someway I can
  easily convert Watir:Input to a Watir:TextField and then do a set on
  it.

 If this is in the context of watir-webdriver, you can do:

   browser.input(:name = foo).to_subtype.set(bar)

 Tiffany: This is an addition in watir-webdriver, where you can use
 browser.input in addition to the normal file_field, text_field etc.

-- 
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: checkbox set but returns false for set?

2011-04-12 Thread Super Kevy
Try checked?

as puts ie.checkbox(:id,'myid').checked?


On Apr 11, 4:11 am, bryan rasmussen.br...@gmail.com wrote:
 Hi,
 I asked this some days ago in a webdriver forum but haven't gotten any
 response.
 It's sort of a followup to my earlier question on how to set the value
 of an input element because I decided just to change the code to make
 it explicitly find the element as a checkbox.

 I have the following code:

 When /^I (un)?check ([^\]*)$/ do |negate, checkbox_label|
   flag = (un != negate)
   checkbox = $browser.checkbox(:id, checkbox_label)
   puts checkbox.exists?
  puts checking checkbox
  puts checkbox.set?
  if(flag)
  puts now what
   checkbox.set
   puts checkbox.set?
  else
  puts dont set id
   checkbox.clear
  end
 end

 The html that is being checked is

 input type=checkbox title=Tilføj til din aftale
 autocomplete=off id=check_PP-INTERNET-HOSTING-EN_CL1_ALT1
 onclick=toggle_alt(this, 'PP-INTERNET-HOSTING-EN_CL1_ALT1',
 'panel_PP-
 INTERNET-HOSTING-EN_CL1_ALT1');

 And the output reads

 true
 checking checkbox
 false
 now what
 false
     And I check check_PP-INTERNET-HOSTING-EN_CL7_ALT1

 so true checkbox exists,
 no error when I try to checkbox.set,
 but false for checkbox.set?

 Any ideas what can be causing this, and any ways I can get around it.

 Thanks,
 Bryan Rasmussen

-- 
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: checkbox question

2011-04-12 Thread Chuck van der Linden
+1

On Apr 11, 5:22 am, Željko Filipin zeljko.fili...@wa-research.ch
wrote:
 On Fri, Apr 8, 2011 at 5:49 PM, Charley Baker charley.ba...@gmail.com
 wrote:

  I like having Watir-Webdriver support here

 +1

 Željko
 --
 watir.com - community manager
 watir.com/book - author
 watirpodcast.com - host
 viaqa.mobi conference on software testing - organizer

-- 
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: How to 'click' row from table returned by AJAX-helper at google.com?

2011-04-12 Thread Chuck van der Linden
Heh  using the correct method name for the element might be the
difference there  (row  vs 'tr') many watir method names for various
elements are more friendly (indended to make the code easier to read)
than the HTML tag designation..

 row   vs  tr
 link  vs  a
 button  vs  input type='submit'
 image  vs  img

for just a few examples.

On Apr 12, 1:55 am, Sergey Erokhin sergey.erok...@gmail.com wrote:
 browser.row(:class = 'gac_a', :index= 2).click
 work for me in IE

 On Apr 10, 5:24 pm, Vitaliy Smok 4sm...@gmail.com wrote:







  No, result is the same - autosuggestions hided. No search.

  irb(main):104:0 browser.tr(:class = 'gac_a', :index= 2).click
  = []

  require rubygems
  require watir-webdriver

  browser = Watir::Browser.new(:firefox)
  browser.goto(http://www.google.com;)
  browser.text_field(:name = q).set 1
  browser.tr(:class = 'gac_a', :index= 2).click

  2011/4/10 Tim Koopmans tim.ko...@gmail.com

   Click on the table row instead, and use the :index attribute

   e.g.

   browser.tr(:class = 'gac_a', :index= 2).click

   will click the third row of the auto suggestions ...

   On Sat, Apr 9, 2011 at 6:40 PM, Vitaliy Smok 4sm...@gmail.com wrote:

   Hi!
    I'm study using of Watir at Ruby. At main page (www.google.com) when
   you entering something AJAX-helper gives you 10 variants of search 
   queries,
   and you can click at any of them to get immediately search results. That
   helper is just table and you can access its elements by 
   browser.table(:class
   = 'gac_m')[X]. For example, text of element::
browser.table(:class = 'gac_m')[3].text
   = 1 \320\272\320\262\321\226\321\202\320\275\321\217

   Here example how I'm doing now:

   require rubygems
   require watir-webdriver

   browser = Watir::Browser.new(:firefox)
   browser.goto(http://www.google.com;)
   browser.text_field(:name = q).set 1
   browser.text_field(:name = q).set browser.table(:class =
   'gac_m')[3].text
   browser.button(:name = btnG).click

   But I'm wondering how i can click it from Watir to simulate real user
   actions:

   irb(main):182:0 browser.table(:class = 'gac_m')[3].click
   = []

   and nothing happens, so I'm doing something wrong, may you advice?

   system: Ruby1.87WindowsXPFireFox 4

   --
   Before posting, please readhttp://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

    --
   Before posting, please readhttp://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

-- 
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: checkbox set but returns false for set?

2011-04-12 Thread Chuck van der Linden
You may also need to consider the point that the thing is obviously
got some javascript interacting with it, since it is wired up to
respond to clicks..   Did you notice this part

onclick=toggle_alt(this, 'PP-INTERNET-HOSTING-EN_CL1_ALT1', 'panel_PP-
INTERNET-HOSTING-EN_CL1_ALT1')

try seeing what happens if you .click  on it instead of using .set,
or .click it after using .set

Also try having a good look at the DOM with that thing both set and
unset (doing that manually with the mouse) and see if perhaps the ID
is changing or something?   I can't be sure what that javascript code
is doing, but 'swap' in the name makes me suspect it's changing some
aspect of the element (perhaps just it's alt text, but maybe it's ID
also)


On Apr 12, 6:31 am, Super Kevy kpe...@scholarshipamerica.org wrote:
 Try checked?

 as puts ie.checkbox(:id,'myid').checked?

 On Apr 11, 4:11 am, bryan rasmussen.br...@gmail.com wrote:







  Hi,
  I asked this some days ago in a webdriver forum but haven't gotten any
  response.
  It's sort of a followup to my earlier question on how to set the value
  of an input element because I decided just to change the code to make
  it explicitly find the element as a checkbox.

  I have the following code:

  When /^I (un)?check ([^\]*)$/ do |negate, checkbox_label|
    flag = (un != negate)
    checkbox = $browser.checkbox(:id, checkbox_label)
    puts checkbox.exists?
   puts checking checkbox
   puts checkbox.set?
   if(flag)
   puts now what
    checkbox.set
    puts checkbox.set?
   else
   puts dont set id
    checkbox.clear
   end
  end

  The html that is being checked is

  input type=checkbox title=Tilføj til din aftale
  autocomplete=off id=check_PP-INTERNET-HOSTING-EN_CL1_ALT1
  onclick=toggle_alt(this, 'PP-INTERNET-HOSTING-EN_CL1_ALT1',
  'panel_PP-
  INTERNET-HOSTING-EN_CL1_ALT1');

  And the output reads

  true
  checking checkbox
  false
  now what
  false
      And I check check_PP-INTERNET-HOSTING-EN_CL7_ALT1

  so true checkbox exists,
  no error when I try to checkbox.set,
  but false for checkbox.set?

  Any ideas what can be causing this, and any ways I can get around it.

  Thanks,
  Bryan Rasmussen

-- 
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] Excerpts from Watir Day

2011-04-12 Thread Bret Pettichord
http://www.youtube.com/watch?v=pS3yNY9hpx0

Excerpts from Bret Pettichord and Charley Baker speaking about the Next
Steps for Watir at Watir Day San Francisco April 3rd, 2011. They discuss how
the Watir project will be supporting Firefox 4 and integrating with
WebDriver.
Complete presentation slides can be found at

http://wiki.openqa.org/display/WTR/Next+Steps+for+Watir

-- 
Bret Pettichord
Director, Watir Project, www.watir.com

Blog, www.testingwithvision.com
Twitter, www.twitter.com/bpettichord

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