Я работаю над Cefsharp Offscreen в моем приложении. Код, представленный в документации для загрузки страницы:
const string testUrl = "https://github.com/cefsharp/CefSharp/wiki/Quick-Start";
var settings = new CefSettings()
{
//By default CefSharp will use an in-memory cache, you need to specify a Cache Folder to persist data
CachePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "CefSharp\\Cache")
};
//Perform dependency check to make sure all relevant resources are in our output directory.
Cef.Initialize(settings, performDependencyCheck: true, browserProcessHandler: null);
// Create the offscreen Chromium browser.
browser = new ChromiumWebBrowser(testUrl);
// An event that is fired when the first page is finished loading.
// This returns to us from another thread.
browser.LoadingStateChanged += BrowserLoadingStateChanged;
Cef.Shutdown();
, но я хочу что-то подобное
browser = new ChromiumWebBrowser(); //without testUrl
// and then
browser.Load(testUrl).Wait();// and wait something like that;
// load url and wait unit page is fully loaded then go to next line
Я не смог найти никакого решения.