Jump to content
UBot Underground

Help With Cookies If Anyone Can Help Me


Recommended Posts

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

Link to post
Share on other sites

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")
  • Like 1
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...