I need to get the HTML source code of a popup page via CefSharp. But I can't get an instance of the popup as IWebBrowser, it's provided only as an IBrowser object.

I use WPF, and CefSharp 71.

public void OnAfterCreated(IWebBrowser chromiumWebBrowser, IBrowser browser)
        {
            if (browser.IsPopup)
            {
                var html = browser.GetSourceAsync();<<< error!
            }
        }

The function GetSourceAsync() is available only in IWebBrowser.

0 Answers