Apple's XCUITest framework for UI Testing on iOS and Mac OS.
Questions tagged [xcuitest]
638 questions
2
votes
3 answers
XCUI Test: How to fetch List of elements from the iOS screen
I have recently started automating iOS apps on iPhone real devices with the XCUI test setup.
I got a scenario where my app contains 5 screens in the home page, each screen contains a unique card number and its balance so i have to fetch the card…

kumar
- 55
- 2
- 11
2
votes
2 answers
Upgrading XCode to 9.1 and iOS Simulator to iOS 11.1 has slowing down Appium-iOS tests drastically
Upgrading XCode to 9.1 and iOS Simulator to iOS 11.1 has slowing down Appium-java based tests drastically.
My set-up
Appium-ide: 1.2.7
Appium command-line: 1.7.1
IOS: macOS Sierra 10.12.6
XCode: 9.1(9B55)
iOS Simulator: iOS 11.1
Previously it was…

user2451016
- 1,857
- 3
- 20
- 44
2
votes
1 answer
XCode9: XCUITest gives Runner UIAccessibility Error
I'm getting a lot of error when run XCUITests on real device:
Runner [AXValidations] UIAccessibility Error adding -[PHAsset
accessibilityLabel] Runner [AXValidations] UIAccessibility Error
adding -[PLManagedAsset accessibilityLabel]…

Maria L Sol
- 21
- 3
2
votes
2 answers
How to get the content of floating title in SkyFloatingLabelTextField using XCUITest?
In my XCUITests I need to check content of floating title label in SkyFloatingLabelTextField after validation error.
I've set accessibilityIdentifier for SkyFloatingLabelTextField element, so I can tap and enter text into it without any issue, but…

Krzysiek Sadowski
- 21
- 1
2
votes
1 answer
iOS XCUITest simulate fingerprint
I'm writing automated UI test using native tools. On one flow there is poped a fingerprint authentication. How can I pass it, to move forward to next screen?

Volodymyr
- 1,165
- 5
- 16
2
votes
0 answers
Xcode server at Xcode 9 ; Bot XCUITest fails: 'Test target encountered an error (Early unexpected exit.....)
We have set up continuous environment at xcode9 at dedicated mac.Xcode-server is set up on that machine and bot has been created to build project and execute tests.
Build required cocoapods , hence pre-integration script is also used.
Now, when bot…

AnkitS
- 21
- 4
2
votes
1 answer
Xcode 9, iOS 11, XCUITest failure: Main Thread Checker Flurry Analytics
Running my suite of XCUITests using Xcode 9 running on iOS 11.
Tests all run perfect in Xcode 8 (iOS10), but in Xcode 9 I get the following error:
Main Thread Checker: UI API called on background thread [UIApplication statusBarOrientation]...
...…

Charlie S
- 4,366
- 6
- 59
- 97
1
vote
0 answers
how to build for testing iOS with xcode and run test on real device with CI
I am working on CI/CD for iOS development and I'm facing an issue with XCUITest. I want to build the project for testing and then upload the zip to pCloudy service to run test.
I tried to run it with fastlane with destination is…

linh lê
- 102
- 5
1
vote
0 answers
XCUITest build fails because file in main target has #import that it claims "file not found"
I'm trying out XCode UI Tests for the first time (XCUITest Framework) and getting stuck almost at the beginning. I'm following these instructions.
I created a new UI Testing Bundle target. It created the default boilerplate classes. When I try to…

Kenny Wyland
- 20,844
- 26
- 117
- 229
1
vote
0 answers
How to mock files for the `DocumentGroup` scene in XCUITest
Situation:
I have a document-based SwiftUI app using a DocumentGroup scene with a custom FileDocument.
struct ChessRoomApp: App {
var body: some Scene {
DocumentGroup(newDocument: SomeDocument()) { file in
…

Luïs
- 2,671
- 1
- 20
- 33
1
vote
0 answers
Xcode 14.3 XCUITests not recognising buttons on iOS12 devices
Since updating to Xcode 14.3, my UITests are failing to tap buttons on devices running iOS12!
Here is my code which works fine on other devices running iOS16 and also when using Xcode 14.2:
@discardableResult
public func waitForButton(with…

skeg0
- 95
- 2
- 10
1
vote
2 answers
In XCUITest, unable to tap() on Switch
I have a simple screen with three switches. I have added the accessibilityindetifier to the the switches and also confirmed that the switch is enabled, hittable,not Selected. But when I get no response when I try to tap() on the element. The steps…

picstand
- 141
- 2
- 13
1
vote
1 answer
XCTest cannot find picker or any of its picker wheel values (SwiftUI + Apple Watch)
I have a timer app for the apple watch. the homescreen has 2 pickers. one for time and one for background sounds. I am trying to write tests for both but am still stuck on the first picker.
the goal:
Test launches. selects first picker. default…

zamanada
- 158
- 13
1
vote
0 answers
Appium Inpector showing XCUIElementTypeAny instead of XCUIElementTypeCell
In a table view, there is a list of Cells we have applied accessibility IDs for that list but when I inspect it through Appium inspector it is showing XCUIElementTypeAny instead of XCUIElementTypeCell and inside the Cell, all child element is also…

Mayank Sati
- 11
- 1
1
vote
2 answers
SwiftUI XCUIElement - How to grab XCUIElement on the screen?
TAKE_A_LOOK_AT_SCREENSHOT_HERE
I'm facing an issue with the UI test written in SwiftUI.
I need to grab an element on the screen which is implemented with following the code:
HStack {
Button(action: {
if value != 0 {
value -= 1
…

Ernest
- 11
- 3