[英]Any way to take screenshot of URL in java
Please suggest the way to take screenshot of URL/HTMLFile in java. 请提出在Java中拍摄URL / HTMLFile屏幕截图的方法。 I am trying with LOBO Browser and able to Open URL in jframe but not able to take screenshot of content inside jframe. 我正在尝试使用LOBO Browser,并且能够在jframe中打开URL,但无法在jframe中获取内容的屏幕截图。 Please check code sample 请检查代码示例
import org.lobobrowser.gui.FramePanel;
public LoboTestFrame() throws Exception {
FramePanel framePanel = new FramePanel();
this.getContentPane().add(framePanel);
framePanel.navigate("http://en.wikipedia.org/wiki/Main_Page");
}
Not able to capture loaded content as image 无法将加载的内容捕获为图像
Yes. 是。 Combine Desktop#browse()
, mentioned here , with Robot#createScreenCapture()
, illustrated here and here . 将此处提到的Desktop#browse()
与此处和此处所示的Robot#createScreenCapture()
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.