Package org.openqa.selenium.net
Class Urls
java.lang.Object
org.openqa.selenium.net.Urls
-
Method Summary
-
Method Details
-
urlEncode
Encodes the text as an URL using UTF-8.- Parameters:
value
- the text too encode- Returns:
- the encoded URI string
- See Also:
-
fromUri
-
from
Convert a string, which may just be a hostname, into a validURI
. If no scheme is given, it is set tohttp
by default.We prefer to use
URI
instead ofURL
since the latter requires a scheme handler to be registered for types, so strings likedocker://localhost:1234
would not generally be a validURL
but would be a correctURI
.A known limitation is that URI fragments are not handled. In the expected use cases for this method, that is not a problem.
-