Re: [wtr-general] Accessing an unordered list

2011-04-06 Thread Keith Hughes
Hi Anne, Have you tried browser.li(:id= abc/123,:index=1).click ? rgds Keith On Wed, Apr 6, 2011 at 9:49 PM, Anne annemordk...@gmail.com wrote: I've been doing automation for a while but am new to Ruby/Watir. I'm trying to access the first item in an unordered list and everything I

Re: [wtr-general] Re: help-please: cucumber-watir tutorial

2010-12-14 Thread Keith Hughes
Irfan, Have a look at these, http://khughes88.wordpress.com/tag/cucumber/ http://khughes88.wordpress.com/tag/webdriver/ rgds Keith On Tue, Dec 14, 2010 at 3:04 AM, Dave McNulla mcnu...@gmail.com wrote: that's on my wish list. i'll probably buy it next. dave On Dec 13, 10:39 am, Chuck

Re: [wtr-general] execute the ruby script remotely

2010-10-21 Thread Keith Hughes
Hi Arihan, Here's something fairly simple that works. gem install sinatra run this script on the target machine require 'rubygems' require 'sinatra' get '/ruby' do `ruby rubyscript.rb` puts I'm runnning your script now end Now, on the other machine either browse to

Re: [wtr-general] Does anyone know if ci_reporter gem works with ruby 1.9?

2010-10-20 Thread Keith Hughes
Hi, In the first example, did it create a test/reports folder in the folder where your test resides? Keith On Tue, Oct 19, 2010 at 12:43 PM, paneer_tikka neeraja...@gmail.com wrote: I couldn't get it to work. The following code produces no xml --- require 'test/unit'

Re: [wtr-general] using verify method

2010-09-14 Thread Keith Hughes
Kartheek This should work, require 'watir/testcase' require 'watir-webdriver' class Test_google_ff Watir::TestCase def setup @Browser = Watir::Browser.new(:firefox) @Browser.goto http://www.google.com; end def test_google1 verify(@Browser.button(:name,blah).exist?,Dude where's my

Re: [wtr-general] Close All browser function

2010-09-14 Thread Keith Hughes
Hi Usman looking through the code in browser.rb all I can see is 'close', no 'close_all' or 'quit' Regards Keith On Tue, Sep 14, 2010 at 10:28 AM, Usman Hussain usmanhhuss...@gmail.comwrote: Hi Guys, Im using Watir-WebDriver and firefox In my tests at the end I want to close all instances

Re: [wtr-general] Close All browser function

2010-09-14 Thread Keith Hughes
Hi Usman, If you really want to shut down all browers you could try this: require 'sys-proctable' Sys::ProcTable.ps.each{|ps| if ps.name.downcase==firefox.exe Process.kill('KILL',ps.pid) end } Keith On Tue, Sep 14, 2010 at 10:28 AM, Usman Hussain usmanhhuss...@gmail.comwrote: Hi

Re: [wtr-general] Setting text in br tags

2010-09-14 Thread Keith Hughes
Hi Usman, try browser.element_by_xpath(//b...@_moz_editor_bogus_node='TRUE']/).set(blah) Keith On Tue, Sep 14, 2010 at 3:00 PM, Usman Hussain usmanhhuss...@gmail.comwrote: Hi Guys, (Me Again...!) Ive come across a problem (again...) For the paragraph field for the CMS system im automating

Re: [wtr-general] Javascript popup on goto()

2010-09-14 Thread Keith Hughes
Hi Alexis, how about doing the whole lot in the execute_script part: browser = Watir::Browser.new(:firefox) browser.execute_script(' window.location=http://www.url.com;; window.confirm = function(msg) { return true; ') the window.location part replaces the goto in this case I'm not sure if the

Re: [wtr-general] The problem about UTF-8

2010-09-10 Thread Keith Hughes
I tried your script and got a problem with the format of the text entered in firefox. However it worked fine in Internet Explorer. Could this be a firewatir or firefox issue specifically? On Fri, Sep 10, 2010 at 1:59 PM, Quang quang...@gmail.com wrote: I have a problem about UTF-8 when set

Re: [wtr-general] How to access attribute link eg. onclick

2010-09-09 Thread Keith Hughes
To verify that the expected params are in place you could do something like this: if @browser.element_by_xpath(//a[contains(@onclick,'xx')]).exists? puts 'xx parameter used' end rgds Keith On Thu, Sep 9, 2010 at 5:11 AM, KH khenghuat...@gmail.com wrote: Hi all I've a link a