spa3212 1 Posted July 23, 2017 Report Share Posted July 23, 2017 Hi,I want to learn to use cookies..like 1. how one can save cookies in csv file..save cookies after we sucessfully login to some website,. 2. how to load that cookies later on from csv file so that we don't have to repeat login process I don't know if this is possible please advice.. Thanks Quote Link to post Share on other sites
HelloInsomnia 1103 Posted July 24, 2017 Report Share Posted July 24, 2017 This uses a text file, you could use a CSV if you really wanted to but I think this way is a bit shorter: set(#cookieFile,"D:\\cookies.txt","Global") navigate("http://www.html-kit.com/tools/cookietester/","Wait") click(<value="Set Test Cookie">,"Left Click","No") wait(1) wait for browser event("Everything Loaded","") save to file(#cookieFile,$get all cookies) navigate("about:blank","Wait") clear cookies navigate("http://www.html-kit.com/tools/cookietester/","Wait") clear list(%cookies) add list to list(%cookies,$list from file(#cookieFile),"Delete","Global") loop($list total(%cookies)) { clear list(%cookie) add list to list(%cookie,$list from text($next list item(%cookies),","),"Delete","Global") set cookie($list item(%cookie,0),$list item(%cookie,1)) } navigate("http://www.html-kit.com/tools/cookietester/","Wait") 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.