Saturday, June 21, 2008

Accessing iframes using Ruby

"Watir allows access to frame objects by identifying them by their name attribute. This is the form that Watir takes to access a frame:

To access individual objects within that frame, you prefix the object using the Watir code above. If we had a hyperlink in the menu frame: Click Menu Item, we could click it like this:
   ie.frame("menu").link(:text, "Click Menu Item").click

See [installation dir]/watir_bonus/doc/watir_user_guide.html

Also one can access the iframe using the frame ID. for ex.

No comments: