从窗口服务内部在浏览器中加载网页 [英] Load web page in browser internally from window service

查看:101
本文介绍了从窗口服务内部在浏览器中加载网页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个必须加载网页的Windows服务。在网页上有一个JavaScript函数,它将生成动态HTML。



无论如何在Windows服务中加载网页就像在浏览器上一样,可以获得动态生成的HTML。



如果你有其他更好的方法会更有帮助。



谢谢!!



我尝试了什么:



我试过一些WebClient示例和Html Agility Pack但无法获得预期的结果。它只返回网页的HTML字符串。

I have a windows service which have to load the web page. In web page there is a JavaScript function which will generate the Dynamic HTML.

Is there anyway to load web page in windows service as like on browser and can get the dynamic generated html.

It will be more helpful if you have other better way.

Thanks!!

What I have tried:

I have tried some example WebClient and Html Agility Pack but cannot get the result as expected. It just return the HTML string of the webpage.

推荐答案

要考虑的好库可能是 CefSharp.OffScreen [ ^ ]包。看起来它的设计适用于自动化系统。您可以查看他们的 GitHub [ ^ ]页面,看看这是否能满足您的需求?
A good library to consider might be the CefSharp.OffScreen[^] package. It looks like it's designed to work for automation systems. You can have a look at their GitHub[^] page and see whether this would provide what you need?


这篇关于从窗口服务内部在浏览器中加载网页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆