-
Notifications
You must be signed in to change notification settings - Fork 22
fix: making sure keyboard enabled before typetext() - WPB-19174 #3407
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
base: develop
Are you sure you want to change the base?
Conversation
Test Results1 862 tests 1 835 ✅ 2m 11s ⏱️ Results for commit 528d40f. ♻️ This comment has been updated with latest results. |
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.
left a question before approving
while true { | ||
let hasKeyboardFocus = (value(forKey: "hasKeyboardFocus") as? Bool) ?? false | ||
if hasKeyboardFocus { | ||
break |
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.
question: not sure to get the logic, if the keyboard is onfocus we don't type?
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.
No, in this just make sure the keyboard is enabled and the chain function typeText() perform the type action.
tap() | ||
|
||
if Date().timeIntervalSince(startTime) > timeout { | ||
XCTFail("Failed to focus keyboard on element within \(timeout) seconds") |
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.
question: does this actually fail? My guess this is not preventing from continuing execution, to check. Alternative would be to throw
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.
Updated with throws
Issue
Please describe the issue.
Optional: add details about technical approach, solutions etc.
Optional: reference dependencies to other pull requests etc.
Testing
Describe how to test.
Optional: attachments like images, videos, etc.
Checklist
[WPB-XXX]
.UI accessibility checklist
If your PR includes UI changes, please utilize this checklist: