【问题标题】:Watin used in webbrowser control, capturewebpagetofile() can't capture page网页浏览器控件中使用Watin,capturewebpagetofile() 无法捕获页面
【发布时间】:2012-07-23 11:33:04
【问题描述】:

我想在 WebBrowser Control 中创建网页截图,所以我使用 Watin 来实现。但是 capturewebpagetofile() 捕获的都是黑色图像。网页已在 WebBrowser 中完成加载。 capturewebpagetofile() 除了在 WebBrowser 中工作正常。为什么 capturewebpagetofile() 在 WebBrowser Control 中不起作用?

我的代码崩溃了:

IE ie = new IE(webBrowser1.ActiveXInstance);
ie.GoTo(url);
ie.CaptureWebPageToFile(@"c:\test.png");

【问题讨论】:

标签: c# browser screenshot watin


【解决方案1】:

我不推荐使用 ActiveXInstance,为什么不使用 WebBrowser wb = new WebBrowser();而是

【讨论】:

  • 不“推荐”是什么意思?
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2012-04-27
  • 2012-12-28
  • 2013-01-06
  • 2013-03-05
  • 1970-01-01
  • 2018-04-10
  • 1970-01-01
相关资源
最近更新 更多