forked from facebookarchive/WebDriverAgent
-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fixed Xpath lookup for Xcode 14.3 #681
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KazuCocoa
approved these changes
Apr 4, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
That's the way I like it :) |
mykola-mokhnach
approved these changes
Apr 4, 2023
KazuCocoa
reviewed
Apr 4, 2023
github-actions bot
pushed a commit
that referenced
this pull request
Apr 4, 2023
## [4.13.1](v4.13.0...v4.13.1) (2023-04-04) ### Bug Fixes * Fixed Xpath lookup for Xcode 14.3 ([#681](#681)) ([3e0b191](3e0b191))
🎉 This PR is included in version 4.13.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
appium/appium#18444
With Xcode 14.3 Apple introduced a new predicate validation class called
XCTElementQueryTransformerPredicateValidator
which implements theNSPredicateVisitor
protocol, used to validate that the predicate components comply with the expected properties in this context.As part of the query execution the class function
+[XCTElementQueryTransformerPredicateValidator validatePredicate:withExpressionsAllowed:]
is called to validate the predicate, and sincefb_uid
is not an expected property ofXCElementSnapshot
the validation fails and anNSException
is thrown.I tried to find a way to add
fb_uid
as an acceptable property of the validator, however it appears that the list is defined statically and not as an accessible objective-c object, so it can’t be influenced, and in addition the validation call uses the number of expected objects statically.By swizzling the function and replacing it with a function which doesn’t do anything I managed to get Xpath lookup to work once more.