Project

browse

0.0
No commit activity in last 3 years
No release in over 3 years
Open Mechanize pages in a (human-readable) browser
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 0
>= 0

Runtime

 Project Readme

Browse

Open Mechanize pages in a (human-readable) browser

Description

Browse lets you open Mechanize pages in a web browser (like Chrome). This is useful for debugging: when you're using Mechanize and want to examine a page, instead of having to view the page's source in a console, Browse lets you open the page in Chrome, fully rendered.

agent = Mechanize.new
page = agent.get('https://www.google.com/')
page.browse # Chrome opens, showing the page!

Installation

Add Browse to your Gemfile:

gem 'browse'

Notes

Browse doesn't open the URL (e.g. https://www.google.com/) in Chrome, as that wouldn't show what is currently going on in the Mechanize session. Instead, it opens a locally-saved HTML page that has page.body as its source.

Browse is currently tested on OS X with Google Chrome. If you'd like to add support for any other OS and/or browser, please feel free to open a PR.

License

Browse is released under the MIT License. Please see the MIT-LICENSE file for details.