Re: [wtr-general] How to wait with a collection of elements using watir?

2013-11-13 Thread John Fitisoff
Something like this might work Watir::Wait.until { @browser.links(:class, "more-matches").length >= 5 } @browser.links(:class, "more-matches").each do |d|     d.click     p d.text end If you know what the expected number is you could probably just do d.when_present.click within the each block a

Re: [wtr-general] Watir &XPATH and sophisticated tags

2013-11-13 Thread John Fitisoff
You almost never need to resort to xpath if you're using watir. Something like this? b.div(:class, 'modal-dialog-content').tbodys[0].text_fields[0] b.div(:class, 'modal-dialog-content').tbodys[0].text_fields[1] On Wednesday, November 13, 2013 3:55 AM, QOExcel wrote: Hello, All I have to f

[wtr-general] Watir &XPATH and sophisticated tags

2013-11-13 Thread QOExcel
Hello, All I have to find a couple locators (textboxes).They have the same so i need xpath to find definite locator : Find I can find by such request : div(:test_el1, :xpath => '//div[@class="modal-dialog-content"]') but i can't define lower elements through this request

[wtr-general] How to wait with a collection of elements using watir?

2013-11-13 Thread Anisha
Hi, I am using watir+ cucumber. I want to know how to make sure if the multiple elements belonging to a same class have been captured and will loop through. I tried the code: @browser.links(:class, "more-matches").each do |d| d.click p d.text end Issue faced: the step definition passes wit

[wtr-general] rescue in rbuf_fill': Timeout::Error

2013-11-13 Thread Royce King
I have an issue with my watir tests. I am in the process of migrating to a new firewall, and when behind my old firewall the tests work as designed. But when I move my test server behind my new firewall I get the following error. /var/lib/jenkins/.rvm/rubies/ruby-1.9.3-p194/lib/ruby/1.9.1/net