Archive

Archive for November, 2009

the fucntion ie.collect in watir

November 10th, 2009 No comments

Just copy a coding found in the internet for future reference,

$ie.divs.collect {|div|
if div.class_name == “data”
puts div.text
end
}

Categories: watir Tags:

The fast way to fill a textfield in watir

November 9th, 2009 No comments

It is quite slow to fill a text field by ie.text_field().set(content), the fast way is by ie.text_field().value = content.

Categories: watir Tags:

There is no property of class for iframe in watir

November 2nd, 2009 No comments

I encountered an iframe in a webpage which say “iframe class = “the_iframe”, I tried but failed to access the iframe by:
ie.frame(:class, “the_iframe”)

and then I figured out there is no property of class for iframe in watir, and find the iframe by index:
ie.frame(:index, 1)

we can use ie.show_frames to find how many frames are there in a webpage.

Categories: watir Tags: , ,