Disclosure Statement: This site contains affiliate links, which means that I may receive a commission if you make a purchase using these links. As an eBay Partner, I earn from qualifying purchases.

Copy cookies between 2 browsers

Post Reply
darkducke
Posts: 21
Joined: Thu Feb 15, 2018 4:29 pm

Copy cookies between 2 browsers

Post by darkducke »

Hello, I have a WebBrowser that I log into a website, and I copy the cookies using "CookiesVisited" how do I send these cookies to another WebBrowser so that it can access a url that needs these cookies.

Would it be the "SetCookie" function?

my string containing the cookies looked like this:

Code: Select all

Sso-Authenticated=ZnBZrQmNxqUY3TxpnShh_a1VetQyftjlu__qGnh9U1o;ASPSESSIONIDCWDRABAT=CJAHMCLAAPNDKGECCFNIEHEF;_ga=GA1.3.825664800.1663686077;_gid=GA1.3.1848130136.1663686077;_gat_gtag_UA_160219996_7=1;Session_Gov_Br_Prod=44Kycz1y01fkaZtIGLP8e_ljrSXYixXwMA-R-_KA.scp-5685cb445f-888bh;INGRESSCOOKIE=fe33a62c2fc1c4bf;_gid=GA1.3.1828765672.1663686080;_gat_gtag_UA_80181585_36=1;_ga_WGZPDK4DH1=GS1.1.1663686079.1.1.1663686081.0.0.0;_ga=GA1.3.201145966.1663686080;Third-Party-Cookie-Support-Test=true;
in short, I need to use the cookie in another browser to access a protected page!
I appreciate any help!
User avatar
salvadordf
Posts: 4057
Joined: Thu Feb 02, 2017 12:24 pm
Location: Spain
Contact:

Re: Copy cookies between 2 browsers

Post by salvadordf »

Hi,

Use the functions in the CookieVisitor demo to read and write cookies.

Use TChromiumCore.SetCookie to write a new cookie and TChromiumCore.VisitAllCookies to get the cookie values in the TChromiumCore.OnCookiesVisited event.
Post Reply