Questions tagged [xcuitest]

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

638 questions
2
votes
1 answer

How can I download apps to iOS Simulator?

with the recent updates appstore is not available in simulator. I want to download apps such as twitter, facebook etc... to implement some UITests. How can I achieve that?
SwiftyQA
  • 33
  • 4
2
votes
1 answer

XCTest typeText cant switch keyboard to another language

Heloo! I am working with uitests on iOS and am using typeText method to enter a string into a textField. The application is multilingual, so the test case involves entering a string in different languages. However, the method fails for strings other…
2
votes
1 answer

How to disable SIP on macOS VMs for macOS UI testing in CI/CD environment?

I have been trying to run my macOS UI tests on a remote machine(VM), and it does not work. On a local machine, it works after giving the permissions related to accessibility. After digging through, I realised that you need to have SIP disabled and…
sinchan
  • 23
  • 3
2
votes
1 answer

Run UITests from command line Apple Watch

I'm having troubles while running XCUITests on iPhone and paired apple watch (simulators) simultaneously using terminal. I can do it by hitting "test button" for each of my uitests targets separately, it works just fine, but I need to do it 1 - from…
zhanch
  • 145
  • 1
  • 8
2
votes
2 answers

XCUITest; how to find StatusBar

I am trying to create a XCUITest where I like to verify that iOS' Status Bar is either: hidden; or visible. But I cannot 'find' it... for example: func testExample() throws { let app = XCUIApplication() app.launch() let statusBar1 =…
Jens Schwarzer
  • 2,840
  • 1
  • 22
  • 35
2
votes
0 answers

XCUiTests App Hierarchy is all Other Elements

t = 72.34s Requesting snapshot of accessibility hierarchy for app with pid 84589 t = 72.36s Requesting snapshot of accessibility hierarchy for app with pid 84589 ▿ Optional - some : Attributes: Application, pid:…
Marcus
  • 9,032
  • 11
  • 45
  • 84
2
votes
1 answer

Detecting Paste Notification in UI Tests?

I have a use case where I am exercising pasting into a text view and then navigating. I want to know if there is a way to wait on the paste notification disappearing since it blocks interaction with elements underneath it. Anyone have any ideas on…
nomad00
  • 401
  • 3
  • 10
2
votes
1 answer

Failed to get matching snapshot: Lost connection to the application

I'm starting with AWS DeviceFarm and trying to integrate it into my CI pipeline. Recently, when I run my app tests on my device poll, I'm getting the error Failed to get matching snapshot: Lost connection to the application (pid 402). (Underlying…
2
votes
1 answer

Testing Dark Mode using snapshot testing

Any leads how can we use Snapshot testing to test darkmode implementation? Or any other testing strategy for dark mode on iOS. When XCUITest is one of the options along with XCTest (unit-test). The problem with UITest in dark mode means for every…
2
votes
1 answer

XCUITest pre-testing setup

I need to do the pre-test config, one time setup before I run XCUITest (automation test) cases, Example of pre-test setup: (This needs to be done once for test cycle, the output of below APIs is used in all test cases) Fetching qTest access…
Saif
  • 2,678
  • 2
  • 22
  • 38
2
votes
1 answer

XCUITest pass arguments to the test

i have an app that can show many popups in various scenarios, and i would like to verify their text using XCUITest. but would like to be able to do that with no effort for multiple text configurations. for multiple languages for instance. Is there a…
Itay Bianco
  • 697
  • 6
  • 16
2
votes
1 answer

Detect dark mode in XCUI test on real devices

I'm trying to find a way to detect whether a phone is in dark mode or not in an XCUI test. So far I've got this: private func darkMode() -> Bool { if #available(iOS 13, *) { return UIView().traitCollection.userInterfaceStyle…
Ishmael7
  • 172
  • 1
  • 10
2
votes
2 answers

XCUITest system call app in iOS 14 not accessible through springboard

In my project we have a case, where a phone call is launched. We were using using following method to end active call (press on the red headphone button). func endCallNow() { let springboardApp = XCUIApplication(bundleIdentifier:…
2
votes
1 answer

SwiftUI: Assert that sheet is visible

I have a view in which a sheet gets visible at some point. var body: some View { VStack { Text("Test") Text("Test") }.sheet(isPresented: $isPresented, content: { MySheet(isPresented: $isPresented) }) } The sheet…
L3n95
  • 1,505
  • 3
  • 25
  • 49
2
votes
0 answers

How to mock scan QR UI testcases without opening Camera view in Swift iOS?

I have created application which having the Scan QR functionality, which will scan the QR and once scanning done will show the next screen. I want to write the UI test case for scanning QR code without opening the Camera. I have explore and found…
yo2bh
  • 1,356
  • 1
  • 14
  • 26