Skip to content

Instantly share code, notes, and snippets.

@cheezy
Created August 15, 2011 19:05
Show Gist options
  • Select an option

  • Save cheezy/1147467 to your computer and use it in GitHub Desktop.

Select an option

Save cheezy/1147467 to your computer and use it in GitHub Desktop.
# fails if the following block doesn't run
page.browser.windows.each do |win|
puts “title is #{win.title}”
end
page.browser.window(:url => /mripage\.asp/).use do
page.save_preferences
end
@jarib
Copy link

jarib commented Aug 15, 2011

Could be a timing issue. Try .when_present.use for the last block.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment