cookies-to keep session of users browser place some code in u r
driver.get("http://www.neocell.com");
Set<Cookie> cookies= driver.manage().getCookies();
//there r multiple options to get cookies,delete cookies,add cookies etc
//cookie is a inbuilt class
System.out.println("Total Cookies" +cookies.size());
Iterator<Cookie> iter= cookies.iterator();
while(iter.hasNext()){
Cookie c= iter.next();
System.out.println(c.getDomain() + "----" + c.getName() +"---" +c.getValue()); // the website which cookie belongs to and get the name of the cookie and the value of cookie
}
//driver.manage().deleteAllCookies();
//driver.manage().deleteCookieNamed("name");
driver.get("http://www.neocell.com");
Set<Cookie> cookies= driver.manage().getCookies();
//there r multiple options to get cookies,delete cookies,add cookies etc
//cookie is a inbuilt class
System.out.println("Total Cookies" +cookies.size());
Iterator<Cookie> iter= cookies.iterator();
while(iter.hasNext()){
Cookie c= iter.next();
System.out.println(c.getDomain() + "----" + c.getName() +"---" +c.getValue()); // the website which cookie belongs to and get the name of the cookie and the value of cookie
}
//driver.manage().deleteAllCookies();
//driver.manage().deleteCookieNamed("name");