chromium-embedded

Xilium CefGlue - How to get HTML source synchonously?

妖精的绣舞 提交于 2019-12-12 04:56:07
问题 I want to get source of web page in CEF3/Xilium CefGlue rom non-UI thread (offscreen browser) I do this internal class TestCefLoadHandler : CefLoadHandler { protected override void OnLoadStart(CefBrowser browser, CefFrame frame) { // A single CefBrowser instance can handle multiple requests for a single URL if there are frames (i.e. <FRAME>, <IFRAME>). if (frame.IsMain) { Console.WriteLine("START: {0}", browser.GetMainFrame().Url); } } protected override void OnLoadEnd(CefBrowser browser,

JavaScript webdriver-selenium `mouseMove` inaccurate on Chromium?

社会主义新天地 提交于 2019-12-12 04:11:08
问题 Running Chromedriver through NodeJs - protractor and selenium-webdriver - against an embedded Chromium on Windows 10. It seems that using getLocation returns accurate positions, but when I try to have WebDriver move the mouse to those positions, the mouse doesn't get there -- unless I multiply the positions by about 1.45. Surely that can't be right? This is the first time I've used Selenium in years, but I'm sure I haven't had to do this before. Below is an abbreviation of the code, with some

Delphi Chromium Embedded - Create and get a cookie

强颜欢笑 提交于 2019-12-12 03:57:39
问题 I'm using Delphi Chromium Embedded in my application. I should need to save user's account info in a cookie. I know there's CefCookieManager to do it, but i'm not able to find the right procedure to store and to get cookie's value. 回答1: Uses ceflib; const DefaultCookiesDir = 'Cookies/'; implementation {$R *.dfm} procedure TForm1.Button2Click(Sender: TObject); var CookieManager: ICefCookieManager; CookiesPath : String; begin CookiesPath := ExtractFilePath(Application.ExeName) +

Solution for silent-kiosk print on CefSharp?

给你一囗甜甜゛ 提交于 2019-12-12 03:03:52
问题 I want to print my web page silently ( to default printer) with "window.print()" command on CefSharp. CefSharp handles the documents and print very good but i can't prevent printer dialog screen. Is there any option or method to prevent printerdialog ? DotNetBrowser provides silent print functionality but it has page scrolling problem and it is slower than ChefSharp. Thanks 来源: https://stackoverflow.com/questions/40115552/solution-for-silent-kiosk-print-on-cefsharp

Using CefSharp with Owin TestServer

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-12 01:41:26
问题 Due to potential firewall limitations and the need to have many instances of my app that cannot be competing for ports, I would like to use the Microsoft.Owin.Testing.TestServer class to create an in-memory web server that will serve requests to an embedded CefSharp browser (either WPF or Winforms is fine). I can create the TestServer with no issues. How can I configure the CefSharp WebBrowser control to use that Test Server rather than using the standard OS network stack? If I was forming my

Unable to take screenshot of CEF application using Selenium

◇◆丶佛笑我妖孽 提交于 2019-12-12 01:29:35
问题 I am using Selenium to automate the CEF application. I am successfully able to perform operations like click etc. But not able to take the screenshot using Selenium driver. As it is very much required feature for automation. How can I do this? I'm using the following: CEF application - sample application provided by CEF selenium jar - selenium-server-standalone-3.0.1 cef_binary_3.2924.1564.g0ba0378_windows64_client chromedriver Find the below code: import org.openqa.selenium.By; import org

Ajax not working in CefSharp based WebView with local files

寵の児 提交于 2019-12-11 19:23:46
问题 I have successfully embedded CefSharp in win form application using VS-2008 i am loading a jQueryMobile based webpage in webView which uses #id based ajax calls. which are not working in webView. Is there any way to disable the security so i can load local files in the webview ? 回答1: got the answer by my self just needed a single line to do it _browserSettings.FileAccessFromFileUrlsAllowed = true; 来源: https://stackoverflow.com/questions/24291510/ajax-not-working-in-cefsharp-based-webview-with

Translating JS extension demo (CEF4Delphi) from Delphi to C++Builder fails OnWebKitInitialized

☆樱花仙子☆ 提交于 2019-12-11 17:58:00
问题 I want to build the JS Extension demo project included with CEF4Delphi downloaded from https://github.com/salvadordf/CEF4Delphi, which has been installed on C++Builder XE7. My goal is to send messages and variables from Chromium (webpage, javascript) to native C++ function. I found the delphi demo which works good. But I need to translate to C++Builder, and I translated almost of code. It works good if I do not set OnWebKitInitialized member of TCefApplication. But I need to set in order to

unsigned char string in javascript and creating an equivalent buffer in c++

百般思念 提交于 2019-12-11 09:17:32
问题 I want to send a string containing unsigned characters from JavaScript to c++(using Chromium Embedded Framework). The unsigned char at the JavaScript side would be the imageData of a Canvas element. JavaScript code: data = con.getImageData(0,0,mycanvas.width,mycanvas.height).data; var imageDataString = ''; for(var i =4; i< data.length; i += 4) { imageDataString+=String.fromCharCode(data[i])+ String.fromCharCode(data[i+1]) +String.fromCharCode(data[i+2]); } //call the native c++ function