直接贴代码: Set cookies = dr.manage().getCookies(); for (Cookie cookie : cookies) { System.out.println("name :" + cookie.getName() + "\n" + "value :" + cookie.getValue()); } 以京东登陆为例: 运行结果: