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
  • 767
  • 2
  • 8
  • 29

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
  • 6,135
  • 1
  • 27
  • 49
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,339
  • 2
  • 27
  • 51