Package io.fluentlenium.utils
Class UrlUtils
java.lang.Object
io.fluentlenium.utils.UrlUtils
Utils class for Url manipulation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringConcatenate 2 URL Strings.static StringgetAbsoluteUrlFromFile(String file) Converts a file String to a valid URL String.
Example:index.htmlconverts tofile://C:/path/to/file/index.html.static StringRemoves file name from URL stringstatic StringsanitizeBaseUrl(String baseUriSpec, String uriSpec) Sanitize base url from current url by using the same scheme if http/https.
-
Method Details
-
concat
Concatenate 2 URL Strings.- Parameters:
baseUriSpec- base urluriSpec- path part- Returns:
- Concat URL
-
sanitizeBaseUrl
Sanitize base url from current url by using the same scheme if http/https.- Parameters:
baseUriSpec- base URIuriSpec- current URI- Returns:
- Sanitized base url
-
getAbsoluteUrlFromFile
Converts a file String to a valid URL String.
Example:index.htmlconverts tofile://C:/path/to/file/index.html.- Parameters:
file- the file String- Returns:
- the URL String
-
getAbsoluteUrlPathFromFile
Removes file name from URL string- Parameters:
file- the file String- Returns:
- the URL String
-