Apple's XCUITest framework for UI Testing on iOS and Mac OS.
Questions tagged [xcuitest]
638 questions
4
votes
0 answers
Xcode 10.1 Running XCUITest and/or XCTest - Timed out waiting for target to check in
I am running Xcode 10.1 on macOS 10.14.4 (Mojave) and is unable to run any form of Test (XCUITest/XCTest) on my simulator. I constantly receive these error messages after the simulator is launched:
Assertion Failure: :0: Failure requesting…

Lawrence Tan
- 507
- 2
- 12
4
votes
2 answers
iOS Swift UI Tests (XCUITests) stability problem - fastlane scan
During running iOS Tests via fastlane (scan) there are random problems with the tests' stability. The error visible in logs:
Lost connection to the application (pid XXXX).
:0
Does anyone know what may be a reason of losing connection to…

Aleksandra
- 101
- 6
4
votes
3 answers
How to extract performance metrics measured by measureBlock in XCTest
I have a simple test function which will tap a button an measure the performance. I'm using XCTest. After measureBlock returns I can see a bunch of perf-metrics on the console. I would like to get this within the test-program such that I can…

A. K.
- 34,395
- 15
- 52
- 89
4
votes
0 answers
UITest MacOS Click to MenuBar app not work
I try create simple UITest for my MacOS MenuBar app. Test case: Just click to app icon, click to "Customize stations ..." then check stations more than 2 exist in table.
func testStationsExistInTable() {
let app = XCUIApplication()
…

memoris
- 149
- 2
- 12
4
votes
2 answers
XCUI Test fails due to MBProgressHud
I am running a XCUI test on a view controller. Every time the view is initialize, an api call is made and an MBProgressHud is shown. My test demands to search for a button and tap on it, however I can't tap since an overlapping MBProgressHud is…

Danish Merani
- 156
- 8
4
votes
2 answers
How to clear NSUserDefaults programmatically in XCUITest using Simulator
I've read several answers related to this and they suggest doing one of the following, but these options are not working for me. I have an XCUITest and I'm trying to clear the standard user defaults before before running the rest of my XCUITest.…

dannyp32
- 474
- 5
- 14
4
votes
2 answers
XCUITest integration with TestRail
Currently working on integrating my UITest-run results into TestRail, so after every test run it marks my tests as Pass\Fail in testrail.
The idea I have is:
In CI create a "pre-build" script that will create a test run in testrail.
During…

Dimu4
- 213
- 1
- 4
- 18
4
votes
1 answer
XCUITest: Failed to find Matching Element
I have a close button on a ViewController that is being presented as a ChildViewController. I have this button's accessibility turned on and the accessibility identifier is closeButton. This button does not have any text, it just has an image.
I am…
user2876886
4
votes
1 answer
Is it possible to move an app to a split view / a slider over view programmatically inside ui test after an app running?
I want to test that some functionality works in a split/a slide over view.
My current ui test opens the dock panel and tries to drag the iMessage app to the right border of a simulator's screen.
Looks like that any interaction doesn't work with…

Eugene
- 53
- 7
4
votes
0 answers
XCUITest How to interact with webview elements
In XCUITest, I am struggling to interact with webview elements. The app I am trying to automate mainly consists of native screens, which work fine, but some flows are in webviews, which obviously have no AccessibilityIDs like the native elements.…

Simon Gilmurray
- 41
- 3
4
votes
0 answers
How to launch the Discoverability overlay programmatically when XCUI testing on iOS
The Discoverability overlay displays the available UIKeyCommands when a user connects a hardware keyboard to an iOS device.
A user launches the overlay by holding down the Command key.
XCUITests provide a high-level API to blackbox test your app, by…

jamesh
- 19,863
- 14
- 56
- 96
4
votes
1 answer
XCUITest - Unable to find hit point for Image using iOS 11
Since iOS 11 XCUITest is not able anymore to find hitpoints for UIImages anymore, which results in not being able to tap an image or drag a touch to it by using press(forDuration:thenDragTo:).
There is a workaround for tapping an image which works…

Sascha
- 93
- 6
4
votes
1 answer
Unable to set Device Orientation in XCUITest on Swift 4
I have been running the tests successfully till Xcode 8. After updating to Xcode to 9 & 9.0.1 and upgrading to swift 4 number of problems has been araising one after the other.
Now code compiles and launches the app(Finally) but when setting the…

Manoj
- 1,482
- 2
- 20
- 53
4
votes
2 answers
XCUITest Order of Test Execution
Is there any known way to influence the order in which test methods are called by XCUITest? Currently it seems to be completely arbitrary which test method is called in which order.
This makes it impossible to define a specific order. In general the…

BadmintonCat
- 9,416
- 14
- 78
- 129
4
votes
1 answer
XCUITest - How to disable Wi Fi while app is running?
I want to automate how ios App behave while running the XCUITest. When manually executing the test, I turn off the wi fi adapter. How do I do that using Xcode UI test?
thanks
p.s. I found that we can use below command to disable wi fi. But to do…

Flashmark
- 119
- 2
- 10