Wednesday, 9 January 2019

Append query string to URL with simple way

Append query string to URL with simple way
Step 1 : Need to get current URL and your query string
String currentUrl = driver.getCurrentUrl()+String;
Sample method:

 public void addString(String query) {
        String newURL = driver.getCurrentUrl()+query;
        driver.get(newURL);
    }

No comments:

Post a Comment