Apple's XCUITest framework for UI Testing on iOS and Mac OS.
Questions tagged [xcuitest]
638 questions
1
vote
2 answers
XPATH text set dynamic value base on the language
For example "//XCUIElementTypeStaticText[@text='Accept All']"
which name 'Accept All' can be changed base on the language, for example, Spanish will change to 'Aceptar todas'
example :
user14098824
1
vote
1 answer
XCUITest - interacting with notification from lock screen
I am attempting to write a a UI test that taps on a delivered local notification after the device has been locked. I have been successful so far in tapping on a notification that was delivered on the springboard (when the device is already unlocked)…

bitops
- 4,022
- 3
- 26
- 31
1
vote
0 answers
XCUITest: Clicking "Choose" for UIImagePickerController
I am testing UIImagePickerController with allowsEditing = true on XCode 12.4 (Simulator iPhone 11).
I am at the below stage and trying to click the "Choose" button. Since it is out of the app context the "Choose" button is not clickable somehow. (I…

Arjav Dave
- 186
- 8
1
vote
1 answer
XCTest how to toggle Notification Switch in OS Settings?
I'm trying to Enable / Disable the OS Notification Switch for the app I'm testing and I'm unable to. I get as far as the Settings > Notifications > App screen itself but the switch doesn't seem to have a button I can interact with.
This is how far…

user3495629
- 23
- 2
1
vote
1 answer
Unable to find uibutton with image in uistackview inside uitableviewcell in xcuitestcase
I am writing ui test cases for my view. I have some image buttons inside uistackview which itself is inside uitableviewcell of UITableview. I have also set accessibilityIdentifier for buttons but I am still not able to find the button. Following is…

Panks
- 565
- 1
- 7
- 20
1
vote
0 answers
UITests: Xcode 12.5 assertionFailure on XCUIApplication.activate()
We have some UI Tests which open links in an external app (Safari). After verifying Safari is launched, the tests uses the “activate” method on XCUIApplication to return to the application and continue with the test.
Starting with Xcode 12.5 the…

francybiga
- 960
- 1
- 8
- 16
1
vote
0 answers
XCUITest - Changing expectation poll frequency
I'm writing some Xcode UI tests.
The UI under test is very active, and autonomous. Elements update themselves automatically.
I'm trying to test, for example, that a given UITextView contains some text. The text is being updated automatically based…

Jonathan Ellis
- 5,221
- 2
- 36
- 53
1
vote
0 answers
UIVisualEffectView's subviews not shown in XCUIApplication().debugDescription
I have a UIVisualEffectView with 2 subviews added in the UIVisualEffectView's contentView. This works fine when running normally, but when I try to add UI Test to check that the correct subviews are added, XCUIApplication().debugDescription does not…

matchifang
- 5,190
- 12
- 47
- 76
1
vote
1 answer
XCUITest Reading file from bundle form UITest target
I am trying to read a plist file present in Xcode bundle,
Approach #1 (Didn't work):
I was using a static variable(Line #23 in below screenshot) which returns the path of file present in bundle, It didn't work
Approach #2 (Didn't work):
Using…

Saif
- 2,678
- 2
- 22
- 38
1
vote
0 answers
How can we show taps on the device when running XCUITests
While running a UI test in XCUITest, we are not able to know where the tap is happening exactly on an iOS device since the taps are not shown by default. There is a way to show taps as mentioned in this article.
How can we do the same…

Prateik
- 545
- 1
- 5
- 12
1
vote
1 answer
Xcode 14.4 Sims XCUITest Get Simulator Alert Data Error - internal ObjC exception breakpoint
Using Xcode 12.4 Simulator 14.4
For the alert displayed below, I have the following function in my XCUITests that I use to pull the static text displayed on the System Alert:
_ = addUIInterruptionMonitor(withDescription: "", handler: { (alert) ->…

reutsey
- 1,743
- 1
- 17
- 36
1
vote
0 answers
How can I set size and location of the app window within a ui-test?
A bit of background: I recently implemented a Drag and Drop Behavior to my app, where I can drag items from e.g. the Finder inside my NSTableView. Now I wanted to write a few ui-tests for this new functionality.
The general idea was to move the…

ightwinewhet
- 11
- 2
1
vote
0 answers
Is any special configuration required for running XCUITest on a real iPhone's WKWebView via Appium?
I've been knocking my head against the wall for a couple days now and could use some help on figuring out if there's a bug in Appium 1.20.2 for iOS devices on 14.4 (Xcode 12.4) or if I missed some crucial configuration in running tests on real…

Patrick Ramser
- 11
- 2
1
vote
1 answer
How to achieve parallelism in Circle CI when test jobs are running from fastlane fastfile?
I'm stuck at a point where I want to divide the XCUItestcases(total of 40) that I have for my project and run them in parallel(10 testcases run /one parallel executor) in CI. All my ui-tests path are there in fastfile.

Vaijeyanthi
- 13
- 2
1
vote
2 answers
How do I allow tracking in UITest?
I have attempted to call "addUIInterruptionMonitor" for App Tracking Transparency notification but it doesn't register and fails for my next step. Any help on what the description for this dialog is would be helpful, "System dialog" doesn't…

user5462477
- 111
- 1
- 6