Questions tagged [xcuiscreenshot]
8 questions
4
votes
2 answers
Xcode swift UI Testing compare two screenshots
Basically what I have is a list of items and i can create a new item in that list using a button.
Now I want to test whether the item is added in the list when button is clicked or not.
While creating a test case for this, i thought of taking…

Shivam Pokhriyal
- 479
- 4
- 14
3
votes
1 answer
How to make UITests-Runner able to access privacy-sensitive data
I'm running an UITests case w/ UIImageWriteToSavedPhotosAlbum() to save my test screenshot to Photos Album:
- (void)testExample
{
XCUIScreenshot *screenshot = [_app screenshot];
UIImageWriteToSavedPhotosAlbum(screenshot.image, nil, nil,…

Kjuly
- 34,476
- 22
- 104
- 118
1
vote
1 answer
XCode 13.1. Is it possible to take a screenshot of an XCUIElement that doesn't fit in screen?
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?

Марк Осипов
- 25
- 4
1
vote
1 answer
Xcode - Redact element from Image
Is there a way to redact a particular element from an image in xcode? We are doing snapshot tests and currently we cropping the images where needed or just taking snapshots of particular elements to avoid this issue, but we would like to be able to…

reutsey
- 1,743
- 1
- 17
- 36
0
votes
1 answer
FBSnapshotTestcase vs xcuiscreenshot
I am trying to understand the use case FBSnapshotTestcase solves. We already have native apple lib named xcuiscreenshot. Whenever any UITest fails, it automatically takes screenshot of the view for reference.
FBSnapshotTestcase compares with the…

user804417
- 155
- 2
- 13
0
votes
1 answer
XCTEST - How to extract text from the screenshot and compare it with a expected string
Currently I am testing one iOS app for localization.
Is there any way we can take a screenshot of the app screen and we extract a text from that screenshot to compare it with the text coming from the locale string file?

Rohan Bhor
- 1
- 1
0
votes
2 answers
XCUITest Element Snapshot Fails Blinking Cursor
We are using FBSnapshottestcase to take snapshots as part of our XCUITest cases. We have a ScrollView that has an UITextField. We type text into the text field and take a snapshot to verify the element behaves appropriately with text entered (a…

reutsey
- 1,743
- 1
- 17
- 36
0
votes
0 answers
XCTest Assertion Failure Application is not running
I am running the XCTEST testcases on iPad Pro using Xcode 9.4. Application crashes after launch while executing test cases.
My first test step is simple wait and then I verify UI. But I am sure it has nothing to do with test case.
iPad pro has OS…

Yogesh Solanki
- 487
- 5
- 12