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 clear button appears). The problem we encounter is that when you type into the text field a blinking cursor appears. The tests will fail or pass depending on the state of the blinking cursor when the snapshot is taken. Is there a way to disable the blinking cursor for a XCUITest?
The devs added this to the AppDelegate file so that when we are running the test scheme it would do this:
This hide the cursor then for the tests.
You can then you
app.launchArguments
to pass "--UITests"https://developer.apple.com/documentation/xctest/xcuiapplication/1500477-launcharguments