edx/bok-choy — pull request #9 by wedaly (2013-12-23 18:14:46+00:00)
Title: Added validation for URL format

When attempting to visit a URL without a protocol or hostname, Splinter raises a very cryptic `AttributeError`. This PR adds validation for the format of the URL and raises an exception with a reasonable message.

Strictly speaking, this will rule out some URLs that are valid (e.g. with non-HTTP or HTTPS protocol) and will allow some that are invalid (e.g. invalid characters in the path). Those errors will be caught by `browser.visit()` and re-raised as `PageLoadError`s when the page fails to load.

@jzoldak