Package io.fluentlenium.utils
Class UrlUtils
java.lang.Object
io.fluentlenium.utils.UrlUtils
Utils class for Url manipulation.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Concatenate 2 URL Strings.static String
getAbsoluteUrlFromFile
(String file) Converts a file String to a valid URL String.
Example:index.html
converts tofile://C:/path/to/file/index.html
.static String
getAbsoluteUrlPathFromFile
(String file) Removes file name from URL stringstatic String
sanitizeBaseUrl
(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.html
converts 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
-