1

I am trying to capture images from a flash application that runs in a browser and process them in a java application.

So far, I am using (simplified):

Robot r;
BufferedImage i = r.createScreenCapture();

However, to make this work the browser always has to be in the foreground, since this is just a simple screen capture.

My question: Is it possible to capture image data from applications that don't run in the foreground or even access the flash application directly?

Note: It would also be okay, for me to do this with some script (e.g. in python) and then pass the data to the Java Application.

Thanks in Advance!

schrobe
  • 697
  • 1
  • 7
  • 26

2 Answers2

1

I think you can with Selenium:

Check the first answer in this post:

Take a screenshot with Selenium WebDriver

The used method's documentation: TakesScreenshot.getScreenshotAs()

Community
  • 1
  • 1
Adrián
  • 5,997
  • 1
  • 26
  • 48
1

It is not possible to take screenshots if the application is not in foreground. You can use Adrian's answer to take a screenshot if it is in foreground.

Buddha
  • 4,183
  • 2
  • 26
  • 49