unic / ScalaWebTest

ScalaWebTest is a library for writing ScalaTest/Selenium based integration tests for web applications. It helps you with your basic setup and provides a new and very efficient approach to testing.
https://scalawebtest.org
Apache License 2.0
29 stars 9 forks source link

Throw an error when receiving an invalid URI/URL for baseUri and loginUri #87

Closed DaniRey closed 5 years ago

DaniRey commented 5 years ago

As the Javadoc states

The recommended way to manage the encoding and decoding of URLs is to use {@link java.net.URI},
 and to convert between these two classes using {@link #toURI()} and {@link URI#toURL()}.

We use URI to construct URLs, additionally this gives us the resolve method to combine baseUriand path. The downside is, that for invalid values, this fails too late. It only fails when the browser tries to transform it, because something like htp://a.com is a valid URI, but not a valid URL.