mnmldave

These are the sparse ramblings of Dave Heaton, a web and app developer.
May 6 '12
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
— Brian Kernighan

View comments

Apr 16 '12

View comments

Apr 16 '12

View comments

Mar 31 '12

View comments

Dec 11 '11

Resizing Chrome & Firefox with Selenium 2 Grid WebDriver

Recent versions of Firefox and Chrome (wisely) disallow websites from resizing the main browser window. This is awesome for browsing, but not so awesome for automated testing.

The solution, as Luke Inman-Semerau figured out, is that you have to open up a new browser window before using javascript to call window.resizeTo().

This works great for Firefox, but for Chrome, you need to specify the width and height of the browser in the options of the resizeTo call, otherwise Chrome will simply open a new tab.

This Ruby gist briefly demonstrates how to resize the window for different browsers.

View comments