Questions tagged [xcuitest]

Apple's XCUITest framework for UI Testing on iOS and Mac OS.

638 questions
5
votes
1 answer

XCUITest Simulator architecture appears to be unsupported by the Appium1.13.0

I am trying to test native iOS app using Appium v1.13.0. When I execute the tests using iOS Simulator lunched by Xcode 10.2, I get the following error from the Appium…
5
votes
2 answers

CALayer has no AccessibilityIdentifier

I have built a proof of concept that creates a CAShapeLayer object and I am able to set it's AccessibilityLabel correctly. However, I am unable to set an AccessibilityIdentifier (it seems this property exists for UIView objects, but not for CALayer…
Charlie S
  • 4,366
  • 6
  • 59
  • 97
5
votes
4 answers

Open universal links (deep links) with XCUITest

I would like to create several tests for native iOS application. To be more precise, I want to test deep links. But I am not sure how to trigger deep link with XCUITest and I don't really see how launch() and launcArguments…
olyv
  • 3,699
  • 5
  • 37
  • 67
5
votes
0 answers

xcodebuild error DVTAssertions: ASSERTION FAILURE while executing single command line test, but the all test case command works fine

I can execute my project using XCUItest with following command: xcodebuild test -workspace Maple.xcworkspace -scheme Maple -configuration Debug -destination 'platform=iOS Simulator,name=iPhone 8,OS=11.4' This command works fine, and all my test…
Amit Jathar
  • 319
  • 3
  • 14
5
votes
1 answer

Stop scrolling on UITableView at last during XCUI TestCase

In my one of UITableView have more then 10 rows. I want to scroll till last row while UITestCase running. I have written below code to scroll till last row. -(void)scrollToElement:(XCUIElement *)element application:(XCUIApplication *)app{ while…
Yagnesh Dobariya
  • 2,241
  • 19
  • 29
5
votes
0 answers

XCUIElement not found using app.images when running XCUITest

I have a a XCUITest that fails to find a specific image, yet it is perfectly visible on the screen.(emulators and physical devices) How can I workaround or make the the UIImage accessible to the tests? All I want to validate is whether the element…
Wayne
  • 3,359
  • 3
  • 30
  • 50
4
votes
1 answer

XCUITest randomly failing during TearDown- "Failed to Terminate com.bundle.id"

As titled, I literally create a new project with UI Tests and it just fails. /.../Test2/Test2UITests/Test2UITests.swift:37: error: -[Test2UITests.Test2UITests testLaunchPerformance] : Failed to terminate com.darylteo.Test2.Test2:27031: Failed to…
Daryl Teo
  • 5,394
  • 1
  • 31
  • 37
4
votes
0 answers

Is there any way I can run a cli command in xcuitest teardown?

I'd like to generate memgraph file after my UI test, to check leaks. I want to run command like leaks My_App_Name --outputGrah=~/Desktop/Foo.memgrah in teardown, just before UITest process is finished. Is there any way I can do this? or Maybe there…
LakaLe_
  • 454
  • 1
  • 6
  • 15
4
votes
2 answers

XCUITest ios 12 switch element value, is on?

I've come across a weird issue with swift xcuitest regarding switches in my tests. I'm testing settings app, to check if certain switches are on. I'm fairly new to swift but from resources I've read I've found I should do something like the…
Nick Hyland
  • 357
  • 1
  • 10
4
votes
1 answer

Tap method not working in Today View when performing XCUITest

I have an app with a widget, and I need to automate its screenshot creation. However, I am struggling to do it as I cannot click the "Edit" button in Today View. If there are no widgets installed, the button is easily clickable. However, after…
Andriy Gordiychuk
  • 6,163
  • 1
  • 24
  • 59
4
votes
1 answer

XCUITest - Open iOS settings and change date/time

Is it possible to change a device's date/time settings within a UI test? I'm able to open the Settings app, naviguate to General > Date & Time and turn off the "Set Automatically" button. However, I can't find a way to change the pickerWheel value.…
4
votes
1 answer

How to extract details from xcresult file in XCUITest (from Xcode 11)?

I want to parse and get all the details related to my UI tests from xcresult file. Before Xcode 11, I can achieve this by reading the TestSummaries.plist file. But Apple has changed the xcresult format from Xcode 11. I found this on google. But…
Confused
  • 3,846
  • 7
  • 45
  • 72
4
votes
1 answer

Xcode 11: _XCTestCaseInterruptionException when using XCUIElement waitForExistence

I'm currently using the standard XCUIElement function waitForExistence(timeout: TimeInterval) in order to wait for a button to show up. I've always set the timeout greater than 2.0 second, but keep running into the same problem. Assertion Failure:…
AlexE
  • 51
  • 2
4
votes
1 answer

Xcode 11 Export for Localization not working, Include Screenshots feature disabled, and can not find XCUITest screenshot attachments in the test logs

I'm having trouble exporting screenshots using the 'export for localization' feature on Xcode 11. I'm currently working on creating XCUITest suites where I test a certain UI feature of an app, and I want to take screenshots of every page of the app…
kask
  • 43
  • 2
4
votes
3 answers

How to test if a UIImageView contains an image with a specific name using XCUITest?

I have a collectionView that has a bunch of cells that contain a single UIImageView in each cell. I want to test wether or not in each cell, the imageView's image matches the correct image name. In the production code, I've added an accessibility…
leedex
  • 963
  • 8
  • 19