Re: [wtr-general] Unable to click the link (anchor and span)and use xpath in ruby script

2011-09-07 Thread Rahul Sharma
The text you are looking for to click is in the span tag and not the a tag. so this should work. ff.span(:text = 'Find a request').click On 7 September 2011 06:49, Hari harisankarec...@gmail.com wrote: I'm trying toclick a link the aanchor tags from the html shown below. I'm running

Re: [wtr-general] Unable to click the link (anchor and span)and use xpath in ruby script

2011-09-07 Thread Raveendran P
Hi Hari, Have your tried ff.link(:id, 'cwc_menu_local:ROOT.Find a Request-anchor').exist? and ff.link(:id, 'cwc_menu_local:ROOT.Find a Request-anchor').click and ff.link(:id, 'cwc_menu_local:ROOT.Find a Request-anchor').fire_event(onlclick) Thanks Ravi P On Wed, Sep 7, 2011 at 11:19 AM,

Re: [wtr-general] text file data delimited by ; append to web text_field

2011-09-07 Thread Raveendran P
Hi, Please try this solution ie = Watir::IE.start(http://www.test.com;) file = File.open(c:/test.txt, r) lines = file.readlines 1st_value_1st_row=lines[0].split[0] 2nd_value_1st_row=lines[0].split[1] 1st_value_2nd_row=lines[1].split[0] 2nd_value_2nd_row=lines[1].split[1] You can use it in

[wtr-general] Watir on Rails 3

2011-09-07 Thread tanin
I'd like to share my new gems. It is a gem to use Watir with Rails 3. It is based on watir-webdriver. https://github.com/tanin47/watir-webdriver-rails Hope you guys find it useful :) -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice.

[wtr-general] Re: Check focus

2011-09-07 Thread Litha K
I tried the following: require 'watir-webdriver' b=Watir::Browser.new :chrome b.goto 'http://www.google.co.uk' b.execute_script('return document.activeElement').inspect and this doesn't seem to work: #Watir::Input:0x6c948b9ebda204ee located=false selector={:element=(webdriver element)} Any

[wtr-general] Re: Ruby 1.9.2 and Watir 2.01 indexing compatibility

2011-09-07 Thread Jarmo Pertman
That might be the case indeed. Jarmo On Sep 6, 11:46 pm, brett sykes brettcsy...@gmail.com wrote: Hey Jarmo, This sounds like it is caused by (http://jira.openqa.org/browse/WTR-486). His HTML could essentially do something like this: html         table id=a_table             tr

Re: [wtr-general] Re: Check focus

2011-09-07 Thread brett sykes
Well, if you look at the return value, it is a Watir::Input object. Try interrogating the object to figure out what it's properties are. I'll give you a hint - it is the search field. Brett On Wed, Sep 7, 2011 at 9:21 AM, Litha K litha...@googlemail.com wrote: I tried the following:

[wtr-general] Re: Check focus

2011-09-07 Thread Litha K
There are over 400 methods returned for this object. I can check name or id of the search field? Thanks, Kay On Sep 7, 8:07 pm, brett sykes brettcsy...@gmail.com wrote: Well, if you look at the return value, it is a Watir::Input object. Try interrogating the object to figure out what it's