Apple's XCUITest framework for UI Testing on iOS and Mac OS.
Questions tagged [xcuitest]
638 questions
1
vote
1 answer
When is a second priority request trigged on Wiremock?
I'm new to Wiremock and I'm not sure how priority works. I am able to trigger a request I've labeled as first priority but I'm not able to trigger a request I've labeled as second priority. It always just triggers the request that is first priority.…

user2415183
- 61
- 1
- 8
1
vote
0 answers
XCTestCase runsForEachTargetApplicationUIConfiguration not working as expected
Overriding this method of XCTestCase to return true should run the tests once for each UI configuration an app supports. Documentation
What I get is this (screenshot) having 4 languages3 iPhone orientations, light/dark mode:
far more Italian tests…

brainray
- 12,512
- 11
- 67
- 116
1
vote
1 answer
Xcode XCUItest LaunchTests - how do they work
If I create a new Xcode project with Xcode 14 with checked 'Include Tests' checkbox it creates 2 files in the UITests folder:
I am interested in the second one: the [Project]LaunchTests.swift file.
There is this automatically generated code:
…

brainray
- 12,512
- 11
- 67
- 116
1
vote
1 answer
look for multiple type of XCUIElement in swift
I would like to locate two XCUIElements and no problem to find them in following code.
func cells(_ text:String) {
app.cells.element(withLabelContaining: text).firstMatch
}
func text(_ text:String) {
…

jacobcan118
- 7,797
- 12
- 50
- 95
1
vote
1 answer
How do I dismiss the DatePicker popup in UI tests that are running on iOS 16 devices?
I have defined a DatePicker to have the compact style, as follows:
struct ContentView: View {
@State private var selectedDate = Date()
var body: some View {
DatePicker("Date Selected", selection: $selectedDate,…

Adil Hussain
- 30,049
- 21
- 112
- 147
1
vote
0 answers
Class CoreCDP is implemented in both fram
I got a crash on my Xcode with the following message, while I'm trying to run some UITests !
I tried multiple solutions :
1- I've added this piece of code to my podfile, that someone had suggested it on another question or article on the…

Elitia Universe
- 57
- 8
1
vote
3 answers
Xcode 14 , XCUITests - Tap is not working for WebView default done button
We have started adopting a new version of Xcode 14, and we see many tests failure. Many test failures are mainly those with a web view inside the app. After trying all the different alternatives, we cannot tap on the done button; that's the default…

Nish
- 1,510
- 1
- 9
- 8
1
vote
0 answers
"" not found in scope - Swift - XCUITest
I am starting to pick up XCUITest and I am running into an issue. I know a little about Objective-C / Swift. Enough that I have built a simply CRUD app in the past. The issue I am running into is outlined below.
I believe this has to do with…

Martin
- 311
- 1
- 2
- 20
1
vote
1 answer
XCUI Distributed UI Testing
I am working on XCUI test automation for an application involving two devices- for instance a video call application.
Currently I have two projects- project A running device 1's automation and project B running device 2's automation.
Is there a way…

Aniruthan R
- 11
- 1
1
vote
1 answer
How to access Apple Id "Sign In" dialog from UI Test
I have one UI tests and want to test that I press "close" button. In simulator there is an alert displayed asking to sign in with your apple id.
Please see attached Image in URL
Image

Ankit Gupta
- 29
- 4
1
vote
1 answer
iOS XCUITest - How to remove an app from the app switcher using xcuitest?
I am trying to remove an app from the app switcher using xcuitest (basically kill the app). The issue is app.terminate() just terminates it and puts it on background mode. Since there is no press on home action on new iPhones, there is a way to…

learner
- 43
- 3
1
vote
0 answers
iOS XCUITest isAccessibilityElement always false
Simple test case for UILabel
Given UILabel has following properties set:
label.accessibilityLabel = "Hello"
label.accessibilityTraits = .staticText
label.isAccessibilityElement = false
This test is successful despite…

Oridadedles
- 831
- 1
- 6
- 8
1
vote
0 answers
How To Add Launch Arguments & Environment values on iOS Extension In UI Automation Test
I've got a UIAutomation test that tests an app with a Share Extension.
I want to pass in some launchArguments and launchEnvironment properties to the Share Extension in my test.
I can't figure out a way of doing it.
When debug the ProcessInfo in the…

Mark Bridges
- 8,228
- 4
- 50
- 65
1
vote
1 answer
iOS Universal links or contextual links are not working consistently in simulator
We have solid tests for universal links, and We are using the Spotlight to open links in the simulator.
Test steps:
Open Spotlight, past the universal links, and tap enter
The expected result should be open the links in App.
The problem often opens…

Nish
- 1,510
- 1
- 9
- 8
1
vote
0 answers
Getting error while activating appplication in xcuitest script
I am running xcuitest script where I am running the command
Command :
AppsInformation.Apps.viewer.activate()
and Getting error:
"Unable to update application state promptly for Application 'com.mac.macan.acnc.mac'."
Please suggest for this

user16576576
- 23
- 5