UI-Testing-Cheat-Sheet | How do I test this with UI Testing | Testing library
kandi X-RAY | UI-Testing-Cheat-Sheet Summary
kandi X-RAY | UI-Testing-Cheat-Sheet Summary
This repository is complementary code for my post, UI Testing Cheat Sheet and Examples. The post goes into more detail with example images for most examples. The included project highlights working code with a simple Test Host. This was last updated for Swift 5 on Xcode 11.4.1.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of UI-Testing-Cheat-Sheet
UI-Testing-Cheat-Sheet Key Features
UI-Testing-Cheat-Sheet Examples and Code Snippets
Community Discussions
Trending Discussions on UI-Testing-Cheat-Sheet
QUESTION
I have a UIViewController
subclass with a corresponding view designed in interface builder. In interface builder, I've set an accessibility identifier on two labels and Accessibility
as a feature is enabled for both.
I want to define my app flow in code, so I load the VC by let vc = storyboard.instantiateViewController(withIdentifier: storyboardIdentifier) as? MyVC
rather than by defining segues in IB.
In viewDidLoad
, I can confirm that .accessibilityIdentifier
is set.
And yet, in my tests, the elements cannot be found. This always returns false:
...ANSWER
Answered 2019-Aug-21 at 09:12Having painstakingly recreated the view step by step, confirming that elements could be found by their .accessibilityIdentifier
at every step along the way, it was the final wrapping in a UIStackView
that "broke" things.
That is, while everything worked with this view hierarchy:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install UI-Testing-Cheat-Sheet
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page