chromium-embedded

Cefsharp RequestHandler can't catch all the incoming request

China☆狼群 提交于 2020-06-01 07:38:28
问题 I encountered a strange problem when using cefsharp. The browser accessed Twitter and automatically scrolled to the bottom to load new posts. There should be many requests, but the Function GetResourceRequestHandler didn't capture any requests, and the function wasn't called at all. Using the same class to capture Pinterest, requests can be captured, including XHR. The link to visit Twitter is https://twitter.com/HanamuraAsuka You can see many XHR requests in chrome's develop tool, such as

CEF sharp browser wait till website fully loaded

青春壹個敷衍的年華 提交于 2020-05-30 08:04:27
问题 I am using CEFsharp browser and determine the page finish loading with LoadingStateChanged event but it fires many times. I need it to fire only once the page has fully loaded, how can this be done? private async void Browser_LoadingStateChanged(object sender, LoadingStateChangedEventArgs e) { if (!e.Browser.IsLoading) { await Task.Run(async () => { await Task.Delay(3000); }); try { MessageBox.Show("Page has been loaded"); } catch (Exception ex) { } } } 回答1: For those interested, I use (a

How to include VC++ Redistributable Files Needed by CEFSharp

别等时光非礼了梦想. 提交于 2020-05-29 08:18:27
问题 Building an application using the CEFSharp browser, works fine on my machine, but crashes on the server with the following error: System.IO.FileLoadException: A procedure imported by 'CefSharp.Core.dll' could not be loaded. I’ve seen this problem all over the internet, and the most common solution seems to be installing the VC++ Redistributable. However, I don’t have that access on our production server. In the development server, I tried installing the redistrituable (x86, x64, 2017, and

Connecting selenium driver to CEF desktop application

雨燕双飞 提交于 2020-03-05 03:14:32
问题 I want to use Selenium WebDriver to run automated tests in a CEF window that is embedded in an application. When i run application with debug console enabled, and then i start my test i'm getting following error: SessionNotCreatedException: Message: session not created from unknown error: unhandled inspector error: ("code":-32601, "message":"'Target.setAutoAtach' wasn't found") How can I fix this error? Or there is another way to connect to CEF desktop application? My C# code: Cef.Initialize

Connecting selenium driver to CEF desktop application

六月ゝ 毕业季﹏ 提交于 2020-03-05 03:14:26
问题 I want to use Selenium WebDriver to run automated tests in a CEF window that is embedded in an application. When i run application with debug console enabled, and then i start my test i'm getting following error: SessionNotCreatedException: Message: session not created from unknown error: unhandled inspector error: ("code":-32601, "message":"'Target.setAutoAtach' wasn't found") How can I fix this error? Or there is another way to connect to CEF desktop application? My C# code: Cef.Initialize

Delphi Chromium - Iterate DOM

你说的曾经没有我的故事 提交于 2020-01-21 08:45:08
问题 I'm trying to iterate the DOM using TChromium and because i use Delphi 2007 i can't use anonymous methods, so i created a class inherited of TCEFDomVisitorOwn. My code is as below, but for some reason the 'visit' procedure is never called, so nothings happens. unit udomprinc; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ceflib, cefvcl; type TForm1 = class(TForm) Chromium1: TChromium; procedure FormCreate(Sender: TObject); procedure

Delphi Chromium - Iterate DOM

末鹿安然 提交于 2020-01-21 08:43:09
问题 I'm trying to iterate the DOM using TChromium and because i use Delphi 2007 i can't use anonymous methods, so i created a class inherited of TCEFDomVisitorOwn. My code is as below, but for some reason the 'visit' procedure is never called, so nothings happens. unit udomprinc; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ceflib, cefvcl; type TForm1 = class(TForm) Chromium1: TChromium; procedure FormCreate(Sender: TObject); procedure

TChromium : How to keep session alive

杀马特。学长 韩版系。学妹 提交于 2020-01-16 07:04:29
问题 When using DCEF3 TChromium, how can i keep the session alive ? For instance, if i go to a web-site and login on it, when i close my app and open it again, i need to login again. I want to keep the session alive, just like it would be if i use Google Chrome. I tried to add 'CefLib' on my app 'uses' clause and set 'CefCache' like the code below, but although i can see files being stored on 'cookies' folder, it seems to make no difference in keeping the session alive : program Project1; uses

WPF : download files through CefSharp

↘锁芯ラ 提交于 2020-01-15 05:42:33
问题 I'm using CefSharp 1 in my wpf app. How can I download files from sites through my embedded navigator ? When I click on a download link, nothing happens. 回答1: See answer in this thread in the CefSharp group 回答2: You may need to add a shceme handler for the 'file' protocol. That's what we did... Register a scheme with CEF - CEF.RegisterScheme("file", new HandlerFactory()); Add a scheme handler that loads the file from disk and returns a relevant response 来源: https://stackoverflow.com/questions

cefsharp proxy authentication required

感情迁移 提交于 2020-01-14 11:52:53
问题 i'm trying to use proxy with Auth on cefsharp i tried this code and it's working with proxy without Auth only what should i do to set Auth . Cef.UIThreadTaskFactory.StartNew(delegate { string ip = "IP"; string port = "PORT"; var rc = chrome.GetBrowser().GetHost().RequestContext; var dict = new Dictionary<string, object>(); dict.Add("mode", "fixed_servers"); dict.Add("server", "" + ip + ":" + port + ""); string error; bool success = rc.SetPreference("proxy", dict, out error); }); i found this