On Mon, Jun 27, 2011 at 7:33 PM, Anne annemordk...@gmail.com wrote:
I need to be able to get a count of the number of h2 headers on a
page.
Using watir-webdriver gem, you can do this:
browser.h2s.size
# = 5
Željko
--
watir.com - community manager
watir.com/book - author
watirpodcast.com -
solved this problem -- don't need the require 'watir'
however, when I run my test and try to open the browser (ie)
usingWatir::Browser.new :ie
I get a timeout error
C:/Ruby/Ruby187/lib/ruby/1.8/timeout.rb:64:in `rbuf_fill': execution expired
(Timeout::Error)
from
Thanks, Raveendran -- that did it...
On Tue, Jun 28, 2011 at 1:50 AM, Raveendran P jazzezr...@gmail.com wrote:
Hi Anne,
I have no idea how Watir can do this...
But i can give the ruby solution to you
Solution:
1. Collect the entire HTML of the page -- @text=@ie.html
2. Search the
Hi Anne,
I have no idea how Watir can do this...
But i can give the ruby solution to you
Solution:
1. Collect the entire HTML of the page -- @text=@ie.html
2. Search the text h2 in that sting -- @text.scan(h2).length
Example
a=Raveendran -- h2Test1/h2h2test2/h2
COUNT= a.scan(h2).length