0

I load a page in a CefSharp browser. I use my credentials to login, and then when logged in I try to visitallcookies but I always have 0.

I tried both visitallcookies() and visitallcookiesasync(). Both does the same. I'm trying to log in to google.com

chromeBrowser.Load("http://google.com");

private async void button1_Click(object sender, EventArgs e)
    {
        CookieVisitor _cookieVisitor = new CookieVisitor();

        var result = await Cef.GetGlobalCookieManager().VisitAllCookiesAsync();
        Console.WriteLine(result.Count.ToString());
    }

Thanks.

Alfakyn1
  • 83
  • 3
  • 12

1 Answers1

1

I've added the code to the chromeBrowser.FrameLoadEnd method to solve this problem, and maybe you can try it.

{
...
chrome.FrameLoadEnd+=getCookie;
....
}

public async void getCookie{
your code
}
xyzch
  • 26
  • 2