$get all cookies
From UBot Studio
(Difference between revisions)
Line 5: | Line 5: | ||
Cookie Name1, Cookie Value1 | Cookie Name1, Cookie Value1 | ||
+ | |||
Cookie Name2, Cookie Value2 | Cookie Name2, Cookie Value2 | ||
+ | |||
Cookie Name3, Cookie Value3 | Cookie Name3, Cookie Value3 | ||
Revision as of 21:53, 16 October 2015
This function is a Cookie Control function in the UBot Extended Library found in the bot bank. This function will return all cookies on a website in a list.
The cookies are returned in the following format:
Cookie Name1, Cookie Value1
Cookie Name2, Cookie Value2
Cookie Name3, Cookie Value3
Example
navigate("http://www.html-kit.com/tools/cookietester/","Wait") click(<value="Set Test Cookie">,"Left Click","No") set cookie("cookie 1","cookie value 1") set cookie("cookie 2","cookie value 2") set cookie("cookie 3","cookie value 3") add list to list(%shopping cookies,$list from text($get all cookies,$new line),"Delete","Global")
For this example, the website allows the setting of cookies through the web page. The Set Cookie command is also used to set additional cookies through UBot Studio.
When the script is run, the cookies are set both on the page and through UBot Studio, and all 4 cookies are returned to a new line delimited list in UBot Studio.