selenium获取Cookie操作

直接贴代码:

    Set cookies = dr.manage().getCookies();
        for (Cookie cookie : cookies) {
            System.out.println("name :" + cookie.getName() + "
" + "value :" + cookie.getValue());
        }
以京东登陆为例:
运行结果:
selenium获取Cookie操作
原文地址:https://www.cnblogs.com/longronglang/p/6220324.html