I have a long table with multiple elements within. Is is possible to take a "long" screenshot that will include all elements, not only current screen state?
Asked
Active
Viewed 337 times
1 Answers
1
Unfortunately, no. Xcode is a very unintelligent screenshot tool. You get what’s visible for the screen or element you call it on - no more, no less.
You have two options:
- Write code to manually scroll your table a few cells at a time, take a screenshot, and stop when you reach the last element. This obviously results in many screenshots. I’ve not found a smart stitching application that can be run programmatically.
- Invest in a third party visual testing framework such as Applitools. They do have this functionality. If you’re small enough or don’t plan on doing much with their software this can be as inexpensive as $free.

Mike Collins
- 4,108
- 1
- 21
- 28
-
1Thanks a lot for your answer! I suspected that there is no native way to do it in XCTest( Also, I suppose that I will try to reconsider our screenshot testing approach and avoid checking whole big elements at once. – Марк Осипов Mar 22 '22 at 23:40