0

How can I take screenshots of openGL with calabash while using the ios simulator? In the past I could do it with (localhost:37265/screenshot2), but now it is deprecated.

  • Calabash has to coordinate between many moving parts. Xcode, instruments, ruby, cucumber, iOS, MacOS, and hardware versions are all required to accurately answer questions. This calabash-ios topic - http://goo.gl/yQi0bE - explains the details that you should include in your SO posts. – jmoody Jul 12 '14 at 10:48

2 Answers2

0

UPDATED

Calabash iOS 0.18.2 and above now supports OpenGL screenshots.

The following information is out of date, but possibly useful.

The screenshot2 route was deprecated in this PR to provide Xcode 5.1.1 and 64-bit support.

This is the first report we've had of someone who was using this route.

For iOS 7 only, we have some options, but I haven't settled on a solution. This is being tracked in the calabash-ios issues and in this calabash-ios-server branch. Feel free to weigh in with your opinion.

On a side note, the calabash.framework now ships header files that allow users to implement their own routes. It is beyond the scope of this question to provide details, but we have one example of a user implementing OpenGL screenshots using the header files.

jmoody
  • 2,480
  • 1
  • 16
  • 22
  • Where can I find more details about implementing OpenGL screenshots in the header files? – user3812939 Jul 13 '14 at 11:10
  • I looked around for the example today, but I could not find it. I will keep an eye out for it and update this question if I find it. – jmoody Jul 25 '14 at 13:45
0

Since most likely you use UIViews to render OpenGL content, you could create a category on UIView that creates a screenshot of the current state (e.g. by drawing the content to an image). You can call the category using the map method of calabash, e.g.

# the following assumes your OpenGL view has an accessibility label 'OpenGL view' 
# you also have a category 'UIView+Calabash' with a method '-(void)takeScreenshot;'
map("UIView marked:'OpenGL view'", :takeScreenshot) 

You might also want to read the following topic: Programmatically take a screenshot combining OpenGL and UIKit elements

Community
  • 1
  • 1
Wolfgang Schreurs
  • 11,779
  • 7
  • 51
  • 92