Wednesday, 9 January 2019

How to remove special charterer from URL using URLdecoder

How to remove special chartector from URL using URLdecoder
Method for decode URL:
 public String decodeParameter(String param) {
        try {
            return URLDecoder.decode(param, "UTF-8");
        } catch (Exception e) {
            return URLDecoder.decode(param);
        }
    }

- - Call above method to test
ex-
newUrl = driver.getCurrentUrl().
            decodedURL=decodeParameter(curr);

No comments:

Post a Comment