Apple's XCUITest framework for UI Testing on iOS and Mac OS.
Questions tagged [xcuitest]
638 questions
2
votes
1 answer
Set Accessibility Identifier on ActionSheet in SwiftUI
How can i set the accessibility identifier for an ActionSheet in SwiftUI.
I want to tap a button of it, because i need to identify it for my XCUITest.
I'm currently trying this for my :
app.sheets[""].buttons["Choose Photo"].tap()

SwiftiSwift
- 7,528
- 9
- 56
- 96
2
votes
2 answers
Access last element in XCUIElement
In my UI Test, i have this XCUIElement :
XCUIApplication().staticTexts["SUBMIT ORDER"]
When i make a print debugDescription :
po print(XCUIApplication().staticTexts["SUBMIT ORDER"].debugDescription)
There is two element matching :
Find: Elements…

Kevin ABRIOUX
- 16,507
- 12
- 93
- 99
2
votes
3 answers
How can i share data between Main Target and UITest runner target?
I want to share data between the Main app target and the XCUITest target. I didn't find any solution. Is dis possible?

shalu tyagi
- 148
- 8
2
votes
0 answers
XCUITest XCUIElementQuery all non-staticText elements are missing in modal view
I have a modal view for iPad which is wrapped by UIButton
UIButton *fullScreenButton = [[UIButton alloc] initWithFrame:[_helper ownerView].bounds];
fullScreenButton.autoresizingMask = UIViewAutoresizingFlexibleWidth |…

Sergey Ilchenko
- 21
- 2
2
votes
1 answer
How do I collect the stdout and std error from the .xcresult bundle generated by my XCUI Unit Tests?
In Xcode 10 and below, the stdout and stderror of the test suite run could be found and extracted from inside the specified -resultBundlePath using this shell command:
cp -fv $(find $resultBundlePath/1_Test -print | grep TestSuite1 | grep…

ablarg
- 2,400
- 1
- 24
- 32
2
votes
1 answer
Setting accessibility identifier for UI automation testing using XCUITest
I have started writing UI automation tests for IOS using XCUITest. I am a bit confused about setting identifiers to access elements while writing UI tests. Look at the picture.
We have user Defined RunTime Attributes where you can define the key…

nari
- 23
- 5
2
votes
1 answer
XCUITest Testing Native Callkit UI Using Springboard. How to get the caller label?
I am trying to test VOIP calling in our app. I simulate a call and I try to assert if the correct caller ID is present. However, I can't access the caller name label "Bob" using the following:
let springBoard = XCUIApplication(bundleIdentifier:…

Essam Ewaisha
- 439
- 5
- 15
2
votes
0 answers
How to output additional info from my XCUITest to Fastlane log
I use fastlane to wrap my XCUITests, but got from fastlane only some log:
[18:04:56]: ▸ All tests
[18:04:56]: ▸ Test Suite GUITests.xctest started
[18:04:56]: ▸ GT01FirstLaunchUITest
[18:05:11]: ▸ ✓ testFirstLaunch (15.405 seconds)
[18:07:59]: ▸…

Ivan Sorokoletov
- 123
- 1
- 6
2
votes
2 answers
How to get the index of a cell given the text inside in XCUITest?
I'm testing a tableview the cell content in XCUItest. In my case, I don't know the order of the cell text, nor am I allowed to set an accessibility id for the text. How can I get the index of a cell given the text inside?
For instance, if I…

leedex
- 963
- 8
- 19
2
votes
0 answers
XCUITest - How to test CollectionView/TableView elements off-screen?
I have a collectionview that has 8 cells. Each cell has a label that contains some different text. I want to test if each cell contains a label with the correct text. I'm using a loop to go through each text and asset if a cell containing that text…

leedex
- 963
- 8
- 19
2
votes
1 answer
Failed to install or launch the test runner error in jenkins
I encountered an error in Jenkins while executing a job named UITestsJob which runs UI tests. This UITestsJob is pipeline job and its definition is in Jenkinsfile. Additioanally, I have another jobs in the same workspace and sometimes these jobs…

user3246402
- 162
- 2
- 4
- 15
2
votes
1 answer
Firebase Test Lab - iOS app not being installed
I am new to Firebase Test Lab, and I'm having issues running my XCUITests against an iOS app. I have had success running Espresso tests against an Android APK on Test Lab, and have even successfully ran tests against an iOS app that I found on…

Cindy
- 121
- 1
- 1
- 6
2
votes
0 answers
How do I automate share file functionality using XCUItest
My application has ability to preview file which is shared by other application. I want to automate the share file testing using UI testing provided by Xcode.
How do I automate share file functionality using XC UI test in Xcode?

RohitK
- 1,444
- 1
- 14
- 37
2
votes
2 answers
System Alert not appearing in element tree in iOS12
For iOS11, I used the following to access the Face Not Recognized system alert within my UI Test:
XCUIApplication(bundleIdentifier: "com.apple.springboard").alerts.firstMatch
This is not working for me in iOS12. The alert is not showing up anymore…

reutsey
- 1,743
- 1
- 17
- 36
2
votes
2 answers
Reason: image not found when running UI tests using a development pod
I have an app that can successfully deploy to the simulator and a device, but when I attempt to run its associated UI tests, I am getting the following error:
MY_APP_TARGETUITests-Runner[55293:20696349] The bundle
“MY_APP_TARGETUITests” couldn’t…
user10688118