Closed aradzu10 closed 7 years ago
This does not sound like a bug, although as this is a wrapper it would most likely be upstream issue. So I am not sure why you have reported it as such. If you have a question, you should ask it on Gitter, post on StackOverflow or use http://magpcss.org/ceforum/ (for questions specific to CEF).
What URL
reproduces this problem? What version are you using? Please use the Bug Report template
when posting an issue. https://github.com/cefsharp/CefSharp/blob/master/ISSUE_TEMPLATE.md#bug-report
Looking at the CEF
implementation it's likely timing related, try adding a menu item to your app that gets the source, wait a few seconds for your page to load before clicking and see what result you get.
You can call GetSource
on the frame directly and use your own implementation of IStringVisitor
https://github.com/cefsharp/CefSharp/blob/cefsharp/53/CefSharp/IFrame.cs#L75 to debug the problem, your probably best downloading the project source to do this.
Closing due to lack of feedback.
As this appears to be a bug in CEF
, someone will have to post on http://magpcss.org/ceforum/
It's important that you provide a URL that demonstrates your problem.
Once you've posted on http://magpcss.org/ceforum/ then post a link here.
I've created a post on Supoort Forum, but it needs to be approved it says. After that, I'll post the link here.
I am having the same problem. The HTML content from Viewsource and GetSourceAsync are different. and it looks like the one returned on GetsourceAsync is incomplete. How did you solve it?
Yes, this is bug, in the latest version as of now. Here is a url example... https://www.mercari.com/search/?itemStatuses=1&keyword=dam%20troll&sortBy=2 ...but it happens with any large page. The View Source (manual in the ui) and a GetSourceAsync (sp?) in code both are not working as they should. That url has hundreds of listings. But the View source returns only about 30 at the most. Tried browser.refresh no luck, tried page all the way down no luck, tried forced pause after ever page down no luck, tried page-all-the-way-down and then page-all-the-way-up and then view source (or getsourceasync) no luck. This is definitely a bug, or "view source" and "getsourceasync" need a new (non-standard) definition. Anyway, I would love to see a fix, or be proven wrong on this, but such as it is it definitely looks like a bug to me. Thanks. -- Mark
The View Source (manual in the ui) and a GetSourceAsync (sp?) in code both are not working as they should.
CefSharp
is just a wrapper around the Chromium Embedded Framework
.
ViewSource
we simply call the underlying ViewSource method. GetSourceAsync
we call GetSource and resolve the Task<string>
with the StringVisitor
response.If code changes are required then they would need to be made in CEF or Chromium
.
If you can reliably reproduce the issue with the current supported version then please create an issue on the CEF Issue Tracker
.
For reference
I'm using in my project Cefsharp. I want to get the html source of a page after the page done loading. So Im using this code:
And I saw that the line "chromeBrowser.ViewSource();" opens me a notepad with the source file. But I don't get the same "file"/text in my html variable. I would like to get what Im getting from the ViewSource() and not from GetSourceAsync().
How can I do that?