简体   繁体   English

用Java中的URL截屏的任何方法

[英]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.

相关问题 Java:确定String是否为URL(没有www或http),获取其屏幕截图 - Java : Determine if String is an URL(without www or http), take its screenshot 有没有办法使用 Java 截屏并将其保存到某种图像? - Is there a way to take a screenshot using Java and save it to some sort of image? 在原生 Java 中截取屏幕截图并在 flutter 中显示此屏幕截图 - Take screenshot in native java and display this screenshot in flutter 在java中截取屏幕截图并将其保存在桌面上 - take a screenshot in java and save it on desktop 有什么办法我们也可以使用wedriver截取整个页面的屏幕截图,包括向下的页面(滚动条) - Is there any way we can also take the screenshot of entire page including the page which is there in down (scrollbar) using wedriver 在Google App Engine中以编程方式拍摄网址的屏幕截图吗? - Take a screenshot of a URL programmatically in Google App Engine? 截图 URL 证书 Chrome - Selenium - Take screenshot of URL certificate Chrome - Selenium 有没有办法在codenameone(尤其是Android)中截取屏幕截图? - Is there a way to take a screenshot in codenameone (especially for Android)? 如何使用 selenium java 进行彩色截图 - how to take color screenshot using selenium java 如何使用IP地址在Java中拍摄屏幕截图 - How to take Screenshot in Java using IP address
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM