I\'m trying to handle authentication popup using the code below:
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference(\"network.http.phishy-u
Popular solution is to append username and password in URL, like, http://username:password@website.com. However, if your username or password contains special character, then it may fail. So when you create the URL, make sure you encode those special characters.
String username = URLEncoder.encode(user, StandardCharsets.UTF_8.toString());
String password = URLEncoder.encode(pass, StandardCharsets.UTF_8.toString());
String url = “http://“ + username + “:” + password + “@website.com”;
driver.get(url);