cefsharp / cefsharp.dom Goto Github PK
View Code? Open in Web Editor NEWThis project forked from hardkoded/puppeteer-sharp
DOM/JavaScript API for CefSharp
License: MIT License
This project forked from hardkoded/puppeteer-sharp
DOM/JavaScript API for CefSharp
License: MIT License
New SetPropertyValueAsync
and SetValueAsync
methods were added, look at adding the equivalent Set
versions to avoid having to write.
Simple helper methods to make it easier (it's already possible).
Current plan is to publish packages under the name CefSharp.Puppeteer
.
Nuget.org
CefSharp.Puppeteer.DevToolsContext
will replace CefSharp.Puppeteer.Page
as the main entry point. I think overall this makes more sense as the concept of a Page
is a little strange in the context of CefSharp
.
//use the following instead
var devToolsContext = await chromiumWebBrowser.GetDevToolsContextAsync()
CefSharp.Puppeteer
into CefSharp.Puppeteer.Embedded
CefSharp.Puppeteer
CefSharp.Puppeteer.Embedded
to CefSharp.Puppeteer
Simplifies creation of Nuget
package, reduces the project down to a single dll.
The project is being renamed, the repository has been updated. A new nuget package should hopefully be available next week with an improved DOM API.
Error code
There was a mismatch between the processor architecture of the project being built "x86" and the processor architecture of the reference "CefSharp.Puppeteer, Version=1.0.22.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138, processorArchitecture=AMD64", "AMD64". This mismatch may cause runtime failures. Please consider changing the targeted processor architecture of your project through the Configuration Manager so as to align the processor architectures between your project and references, or take a dependency on references with a processor architecture that matches the targeted processor architecture of your project.
Originally posted by @radiaku in #4 (reply in thread)
After upgrading to version 97
(#7) some of the mouse/keyboard
tests started failing.
Chromium
.CEF
vs those generated using puppeteer sharp
and nothing stands out so far.WPF
application it passes correctly.Will skip the tests in the short term as the code appears to be working correctly when run under normal conditions (outside the test cases).
There are two Dispose
scenarios:
DevTools
commands so a new DevToolsContext
can be created later if required.For scenario #2
as the browser is disposing it's difficult and likely not necessary to send the DevTools
commands
When working with frames on some websites, I get entire application crash (it closed completely without any error alerts).
My initial setup to access frames:
settings.CefCommandLineArgs.Add("disable-features=IsolateOrigins");
settings.CefCommandLineArgs.Add("disable-site-isolation-trials");
It doesn't matter for this issue (crash occurs even without these settings), but they are required to have access to frames.
Here is code which leads to crash:
foreach (Frame fr in devTools.Frames)
{
if (fr == null || fr.Detached)
continue;
ElementHandle element = fr.QuerySelectorAsync("#id").Result;
if (element != null) //crashes on this line
{
return element;
}
}
Strange thing is that it works on most websites, but on some ones it leads to crash every time.
In Logs, there are no fatal entries, but only few warning and error ones:
[0927/180147.326:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101 [0927/180147.399:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101 [0927/180147.554:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 21 [0927/180147.555:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 1 [0927/180147.585:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 25 [0927/180147.797:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 29 [0927/180147.797:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 5 [0927/180147.797:WARNING:spdy_session.cc(3502)] Received HEADERS for invalid stream 31 [0927/180148.081:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101 [0927/180148.157:ERROR:ssl_client_socket_impl.cc(983)] handshake failed; returned -1, SSL error code 1, net_error -101
Puppeteer
has a method (not included in puppeteer-sharp
yet) for waiting for navigation, this would be very helpful.
https://github.com/puppeteer/puppeteer/blob/main/docs/api.md#pagewaitfornetworkidleoptions
A number of the XUnit
tests have started failing after upgrade. Likely changes in Chromium
.
Tests appear to be mouse/keyboard input related. Most of the problems seem to be timing related, as when stepping through at least some of the test cases with the debugger they work as expected.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.