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
}
Just copy a coding found in the internet for future reference,
$ie.divs.collect {|div|
if div.class_name == “data”
puts div.text
end
}
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.
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.