[英]C# - Webbrowser not loading pages to the end
I have a problem with loading pages to the end of the web browser (probably because for them is much JavaScript)我在将页面加载到 Web 浏览器的末尾时遇到问题(可能是因为对它们来说 JavaScript 很多)
So I added another browser to the project (Awesomium) and I question whether it is in Awesomium use getElementById
and other...(eg: InvokeScript)?所以我在项目中添加了另一个浏览器(Awesomium),我质疑它是否在 Awesomium 中使用getElementById
和其他...(例如:InvokeScript)?
var links = webBrowser1.Document.GetElementsByTagName("button");
foreach (HtmlElement link in links)
{
if (link.GetAttribute("data-bb-handler") == "ok")
{
link.InvokeMember("Click");
}
}
Or by class name:或按类名:
var links = webBrowser1.Document.GetElementsByTagName("button");
foreach (HtmlElement link in links)
{
if (link.GetAttribute("className") == "close")
{
link.InvokeMember("Click");
}
}
webBrowser1.Document.InvokeScript("redeem_avatar");
HtmlElement _reward = webBrowser1.Document.GetElementById("name-reward");
_reward.InvokeMember("Click");
If you can't be in Awesomium can any other?(Gecko or something?)如果你不能在 Awesomium,其他人可以吗?(壁虎什么的?)
Any help in advance thanks :)任何帮助提前谢谢:)
It looks like Awesomium hasn't been updated anymore in a long time and the API reference is offline.貌似Awesomium好久没更新了,API参考下线了。 However, you can still find it using archive.org: https://web.archive.org/web/20121101103943/http://awesomium.com/docs/1_6_4/sharp_api但是,您仍然可以使用 archive.org 找到它: https ://web.archive.org/web/20121101103943/http: //awesomium.com/docs/1_6_4/sharp_api
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.