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 tohttpby default.We prefer to use
URIinstead ofURLsince the latter requires a scheme handler to be registered for types, so strings likedocker://localhost:1234would not generally be a validURLbut 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.
-