I am trying to login into the yahoo mail with jaunt-api but getting "cookie not enabled issue". I am new in jaunt-api, so please help me. I am using the following code.
try
{
UserAgent userAgent = new UserAgent();
userAgent.setCacheEnabled(false);
userAgent.settings.autoSaveAsHTML = true;
try{
userAgent.cookieJar.saveCookies(new File("e:\\cookie.txt"));
}catch(Exception e){}
userAgent.visit("https://login.yahoo.com/m");
try{
userAgent.cookieJar.loadCookies(new File("e:\\cookie.txt"));
}catch(Exception e){}
Form form = userAgent.doc.getForm(0);
form.setTextField("username", "*****@gmail.com");
form.setPassword("passwd", "*******");
form.submit();
System.out.println(userAgent.doc.innerHTML());
System.out.println(userAgent.getLocation());
}catch(JauntException e){
System.out.println(e);
}