Last Updated: February 25, 2016
·
2.044K
· pixelclear

Browserstack Bookmarklet

If you have not heard of Browserstack.com, it is not your typical cross-browser testing site, you can get access to live browsers to test interactions, not just aesthetic with browser screenshots.

To help use this service with a site your working on, it would be handy to be able to click a bookmarklet and have a brand new window open to test that site in a browser of your choosing. Here are a few that I find useful.

Drag these links into your bookmarks bar:

<a href="javascript:q=(document.location.href.replace(/(https?|file):\/\//,''));void(open('http://www.browserstack.com/test#os=Windows&browser=IE&browser_version=9.0&zoom_to_fit=true&url='+q,'&resolution=1024x768&speed=1'));">Internet Explorer 9</a>
<a href="javascript:q=(document.location.href.replace(/(https?|file):\/\//,''));void(open('http://www.browserstack.com/test#os=Windows&browser=IE&browser_version=8.0&zoom_to_fit=true&url='+q,'&resolution=1024x768&speed=1'));">Internet Explorer 8</a>
<a href="javascript:q=(document.location.href.replace(/(https?|file):\/\//,''));void(open('http://www.browserstack.com/test#os=Windows&browser=IE&browser_version=7.0&zoom_to_fit=true&url='+q,'&resolution=1024x768&speed=1'));">Internet Explorer 7</a>
<a href="javascript:q=(document.location.href.replace(/(https?|file):\/\//,''));void(open('http://www.browserstack.com/test#os=Windows&browser=IE&browser_version=6.0&zoom_to_fit=true&url='+q,'&resolution=1024x768&speed=1'));">Internet Explorer 6</a>
<a href="javascript:q=(document.location.href.replace(/(https?|file):\/\//,''));void(open('http://www.browserstack.com/test#os=Windows&browser=Firefox&browser_version=15.0&zoom_to_fit=true&url='+q,'&resolution=1024x768&speed=1'));">Firefox 15</a>
<a href="javascript:q=(document.location.href.replace(/(https?|file):\/\//,''));void(open('http://www.browserstack.com/test#os=Windows&browser=Chrome&browser_version=21.0&zoom_to_fit=true&url='+q,'&resolution=1024x768&speed=1'));">Chrome 21</a>

Advanced

You can modify this bookmarklet with this code:

javascript:q=(document.location.href.replace(/(https?|file):\/\//,''));void(open('http://www.browserstack.com/test#os=Windows&browser=Safari&browser_version=5.1&zoom_to_fit=true&url='+q,'&resolution=1024x768&speed=1'));

Note: At this time I haven't been able to get it to submit the form, so you will have to click submit for the session to begin.

Update: I have published a set of bookmarklets on github https://github.com/stephenway/browserstack-bookmarklets

4 Responses
Add your response

you can add "start=true" in the above url and it will automatically start the browser

over 1 year ago ·

I am unable to verify "start=true" actually works.

over 1 year ago ·

Sorry, but you also need to use /start instead of /test (more here: http://www.browserstack.com/integrations)

over 1 year ago ·

That pretty much came full circle for my idea, so I made a whole set here https://github.com/stephenway/browserstack-bookmarklets

over 1 year ago ·