public void findRequestWithPassword() throws UnsupportedEncodingException {
String passwd = URLEncoder.encode(credentials.getPassword(), "UTF-8");
String username = URLEncoder.encode(credentials.getUsername(), "UTF-8");
List<HarEntry> requests = getProxy().findInRequestHistory(credentials.getPassword());
if (requests == null || requests.size() == 0)
throw new StepException(
"Could not find HTTP request with credentials: "
+ credentials.getUsername() + " "
+ credentials.getPassword());
currentHar = requests.get(0);
}