$get all cookies

From UBot Studio
Revision as of 13:29, 23 September 2016 by LillyT (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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")
click(<value="Refresh">,"Left Click","No")
wait for browser event("Page Loaded","")
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.

Getallcookies0.jpg

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox