Can you do something like this? topicContentFirstLine = @browser.frame(:index, 2).div(:id, 'topicText').text.first
or topicContentFirstLine = @browser.frame(:id, 'foo').div(:id, 'topicText').text.first Hope it helps. orde On Jul 14, 9:59 am, Anne <[email protected]> wrote: > Can anyone tell me if there is a way to restrict what you are > verifying to just the part of the page that is currently visible? > > On the page I am testing there are 2 frames: outline and content > (kind of like Adobe Reader). When you click on any line in the > outline, that section of the content comes to the top of the second > frame. > I need to verify that what is at the top of the second frame is, > indeed, what the user selected. But I can't figure out how to > restrict my verification to just what is currently visible. > > So far I've got > topicContentFirstLine = @browser.div(:id, 'topicText').text.first > but this gives me the first line of the entire topic, not the first > line of what is currently visible. > > Anne -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected]
