Questions tagged [xcuielement]

17 questions
3
votes
2 answers

SwiftUI tvOS custom Button missing accessibility Focused state

TL;DR: Is there any way to have custom button style (custom pressed state) in SwiftUI on tvOS while it is still working correctly with Accessibility Focus API and therefore its hasFocus works in UI tests? Please visit dedicated Github repo for a…
Lukas Kukacka
  • 7,604
  • 2
  • 25
  • 50
2
votes
0 answers

XCUIElement's Print Statement Not Including Nested Button

Example Image: Desired Behavior: When an XCUIElement is rendered from a screen with (Initial Conditions): An ImageView with.. isUserInteractionEnabled = YES… IsAccessibilityElement = YES… A nested button… isUserInteractionEnabled =…
Tristan Newman
  • 357
  • 1
  • 4
  • 13
1
vote
1 answer

Xcode UI Test: How to move an XCUIElement to another position on the screen?

My app displays map annotations that can be dragged to another position of the map. I want to write a UI test that checks what happens when dragging stops. I found a way (see the docs) to drag an XCUIElement to another XCUIElement…
Reinhard Männer
  • 14,022
  • 5
  • 54
  • 116
1
vote
0 answers

Appium Inpector showing XCUIElementTypeAny instead of XCUIElementTypeCell

In a table view, there is a list of Cells we have applied accessibility IDs for that list but when I inspect it through Appium inspector it is showing XCUIElementTypeAny instead of XCUIElementTypeCell and inside the Cell, all child element is also…
1
vote
2 answers

SwiftUI XCUIElement - How to grab XCUIElement on the screen?

TAKE_A_LOOK_AT_SCREENSHOT_HERE I'm facing an issue with the UI test written in SwiftUI. I need to grab an element on the screen which is implemented with following the code: HStack { Button(action: { if value != 0 { value -= 1 …
Ernest
  • 11
  • 3
1
vote
1 answer

XCode 13.1. Is it possible to take a screenshot of an XCUIElement that doesn't fit in screen?

I have a long table with multiple elements within. Is is possible to take a "long" screenshot that will include all elements, not only current screen state?
0
votes
1 answer

Unable to add / send Text to a XCUIElementSecureTextField using Appium inspector

I'm using Appium Inspector to access the page source of an iOS App. I'm able to send Texts to XCUIElementTextField but not to the SecuretypeField. Even the keyboard is not showing up when I tried to click on the element. note: I'm using the Sauce…
0
votes
1 answer

Search for XCUIElement is too slow

I am using XCUITest for UI-based testing of an iOS app. A major (almost showstopping) problem in the project is performance when searching for elements in the visual tree. Exemplification: Front-screen of app consists of a stack of horizontal…
Developer-1
  • 163
  • 8
0
votes
0 answers
0
votes
1 answer

Not able to locate element using following-sibling or following in Appium for Mac

I'm trying to locate the checkbox in the below xml path using xpath following-sibling. But unable to locate the element. Following is the xml.
Harish
  • 306
  • 1
  • 4
  • 14
0
votes
1 answer

How to grab a path for app.navigationBars

I faced an issue that is combined with UI testing of the view. I have an issue with an incorrect path to the element that is the text field, which is Search. I would like to achieve the state when the code for app.navigationBars will be resistant…
Ernest
  • 11
  • 3
0
votes
1 answer

How to parse the string content of debugDescription in XCUITest swift

As debugDescription returns the XCUIElement UI Tree and this if of type String. Want to fetch specific information based upon parameters like label :[String] will return all the label values, find_Application - will return the bundleID etc
Indrajit
  • 331
  • 1
  • 5
  • 12
0
votes
2 answers

XCTest get parent / sibling of specific element in swift

I would like to get parent (0x7fdc65735bd0) or better directly sibling (0x7fdc657082a0), of .staticText (0x7fdc65708190) which has no identifier, just unique label. ScrollView, 0x7fdc65740830, {{0.0, 94.0}, {375.0, 620.0}} …
destr
  • 33
  • 2
  • 7
0
votes
2 answers

How do I target in-app purchase drawer element with XCUITEST?

I am trying to write a UI test for our app's IAP using a sandbox account. However, when trying to tap this purchase button, the test is unable to find this element:screenshot of in-app-purchase prompt I've tried targeting this element by its button…
ed2311
  • 3
  • 1
  • 3
0
votes
1 answer

Making locators dynamic in XCUITest

Is it possible to make locators dynamic in XCUITest? generally when defining a locator we tend to write as: let optionAbutton = app.buttons["option-a"] And use it in func as optionAbutton.tap(); Now, if there are more buttons on the page like:…
Siva2789
  • 79
  • 6
1
2