Apple's XCUITest framework for UI Testing on iOS and Mac OS.
Questions tagged [xcuitest]
638 questions
2
votes
1 answer
How to view NSLog output of XCUITest and my app at the same time?
I can perfectly view NSLog lines in my Xcode 10.1 output window of my XCUItest, but I'm not able to see NSLog lines of my actual app/code in the output window.
How can I see NSLog output of my app and my testing at the same time in one window?
And…

Lateralus
- 21
- 2
2
votes
1 answer
XCTest: Tap "Done" button in SFSafariViewController
I'm opening a SFSafariViewController and can't find the "Done" Button to leave Safari again.
Also if I try to solve it with a swipeRight XCode creates code that it can't use in a test afterwards
let element = app.children(matching:…

netshark1000
- 7,245
- 9
- 59
- 116
2
votes
1 answer
How to use Appium to automate a 3rd party ios app on real device
I'm trying to automate a 3rd party ios app (YouTube, for example) on a real iPhone using Appium. I haven't been able to find a single guide/tutorial to achieve this, but from the information I gathered, it seems to involve the following…

Mark.H
- 51
- 5
2
votes
1 answer
Waiting for focus using predicate on XCUIElement
I'm currently using NSPredicate to wait for conditions on XCUITest elements, as follows:
class func waitForCondition(condition: String, element: XCUIElement) -> Bool {
let predicate = NSPredicate(format: condition)
let expectation =…

arvere
- 727
- 1
- 7
- 21
2
votes
0 answers
Access main app bundle Info.plist from XCTest target
How can I access main app Info.plist values from a testing target?
I know that i can access other plists with something like:
Bundle(for: BaseTest.self).path(forResource: "CustomData", ofType: "plist")
after including the CustomData.plist in the…

t0a0
- 668
- 1
- 9
- 18
2
votes
1 answer
After updating to macOS 10.14 (Majove) XCUITest failed to execute test case saying "Failed to set pid 2102 as responsible for 20210"
I have updated my MacBook to Mojave (10.14), after that UI test is failing with the following error.
_finishWithError:Error Domain=IDETestOperationsObserverErrorDomain Code=9 "Failed to set pid 2102 as responsible for 20210"…

Ajay
- 349
- 3
- 12
2
votes
2 answers
How to query "Main Window" in iOS UI tests?
At one point in my tests I need to interact with views that are inside Main Window. When I do a po app.windows, I get this:
Find: Target Application 0x1c40d7680
Output: {
Application, 0x1c4389170, pid: 4765, {{0.0, 0.0}, {375.0, 667.0}},…

Mladen
- 2,070
- 1
- 21
- 37
2
votes
1 answer
XCUITest on multiple devices
I need to automate this scenario:
Do sth on 1st device (tap UI element)
Verify sth on 2nd device (verify UI element)
Do sth on 2nd device
Verify sth on 1st device
Is this doable on XCUITest?
Is it possible to sync this sequence?

Pawel Bala
- 93
- 9
2
votes
3 answers
I set up Appium for Real iOS device, Unable to launch WebDriverAgent because xcodebuild failed with code 65
I am trying to run Appium on a real iOS device. I have been able to successfully run it on android, but when I try running for iOS I get the error. Here is my environment:
Appium v1.8.0
iPhone SE 11.2.6
Xcode 9.3.1
I’ve read that error 65 is often…

SilverF0x
- 67
- 1
- 13
2
votes
0 answers
XCUITest - Can't find the webview XCUIElement for HTML checkbox
I have tried
app.webViews.checkBoxes["id"].tap()
but xcode seems to can't detect the html checkbox. Apple's official document lacks detail on this topic. Here's the test log and HTML element
accept

Nattanon Tharachai
- 21
- 4
2
votes
0 answers
Tests on CI server are failing (Xcode 9) iOS
Trying to setup continuous integration for my iOS app. Wrote bunch of unit tests that run fine locally for both phone and simulator.
However, when I run my CI bots the tests are failing with this error:
" Test target X encountered an error (Early…

Eugene Gordin
- 4,047
- 3
- 47
- 80
2
votes
0 answers
XCUITest - Setting accessibilityFrame of button makes the button not hittable and not enabled
Anyone see this before? I'm setting the accessibilityFrame for a particular button. Along with that, I'm making sure that it is an accessibilityElement.
When I debug, self.linkButton is totally unaccessible. It is visible but it is not hittable…

Craig Fisher
- 371
- 2
- 15
2
votes
0 answers
Cucumberish Issue : Step not implemented
I am doing XCUI Testing using the Cucumberish Framework. Sometimes when the test case starts it halts at the very first step
This is intermittent. Most of the times it runs seamlessly. I am are very confused what's going wrong.
I tried hard but…

Vikas
- 914
- 7
- 19
2
votes
1 answer
XCUITest: Running tests across two apps in a coordinated fashion
I am looking at using XCUITest for UI tests for my iOS apps. It looks like XCUITest has a wide arrange of functionality, including the ability to work with multiple apps. However, the multiple app support seems somewhat limited.
It seems that using…

Locksleyu
- 5,192
- 8
- 52
- 77
2
votes
4 answers
How to check empty TextField in XCTest and XCUITest
I have to check if there is any UITextField is empty or contains any value using XCUITest or XCTest. I was checking on many places and found textField.Value can be used to find out the result. But for me the problem is textField.value returns…

Rishi Chaurasia
- 520
- 4
- 18