I am using Cucumber + Webrat + Mechanize adapter and want to test contents of pages that are iframed or framed into the selected page.
In other words:
Scenario: View header on webpage
Given I visit a page containing a frameset
When there is a header frame
Then I should see login details in frame header
The problem is of course the last step: I need to navigate to the frame header and investigate it's contents. I can verify the frame tag is here
response_body.should have_selector "frame[src][name=header]"
This leaves me with two questions:
- How to read the src attribute and navigate to that page
- How to navigate back to the original page