Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Custom matcher in Swift 5 / Xcode 11 / iOS 13 never sets element in GREYMatchesBlock to a UIView (EarlGrey 2.0) #1283
Comments
|
Since the matcher is on the test side, the element returned is an EDOObject - the UIView wrapped as an IPC object EarlGrey uses to communicate between the two XCUITest processes. You could print the element's class to check. Use grey_kindOfClass() before the matcher you are using to get this to work. We use an internal implementation to get it to work. |
|
Does that mean this example code won't work then? |
|
Facing similar problem, i am trying to implement below custom matcher
|
|
is there any update for this ?? |
|
In general, do not do class checks in custom matchers / assertions. You can do them on the preceding matcher. @joolurik what was the issue with your code? It should work fine, unless if it wasn't able to convert into a UIView. |

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

Tested custom matcher in the example project, fails:
Error message:
Originally posted by @whoyawn in #1281 (comment)