Skip to content
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

feat: Add an endpoint for keyboard input #797

Merged
merged 2 commits into from
Oct 26, 2023
Merged

feat: Add an endpoint for keyboard input #797

merged 2 commits into from
Oct 26, 2023

Conversation

mykola-mokhnach
Copy link

the typeKey API is available on iOS since iOS 15

@KazuCocoa
Copy link
Member

  /Users/runner/work/1/s/WebDriverAgentLib/Commands/FBCustomCommands.m:564:20: no visible @interface for 'XCUIElement' declares the selector 'typeKey:modifierFlags:'

      [destination typeKey:keyValue modifierFlags:XCUIKeyModifierNone];
       ~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



❌  /Users/runner/work/1/s/WebDriverAgentLib/Commands/FBCustomCommands.m:578:20: no visible @interface for 'XCUIElement' declares the selector 'typeKey:modifierFlags:'

      [destination typeKey:keyValue modifierFlags:modifierFlags];
       ~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

oh. - (void)typeKey:(id)arg1 modifierFlags:(unsigned long long)arg2; may need in XCUIElement.h? then it is available since Xcode 15

@mykola-mokhnach
Copy link
Author

  /Users/runner/work/1/s/WebDriverAgentLib/Commands/FBCustomCommands.m:564:20: no visible @interface for 'XCUIElement' declares the selector 'typeKey:modifierFlags:'

      [destination typeKey:keyValue modifierFlags:XCUIKeyModifierNone];
       ~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



❌  /Users/runner/work/1/s/WebDriverAgentLib/Commands/FBCustomCommands.m:578:20: no visible @interface for 'XCUIElement' declares the selector 'typeKey:modifierFlags:'

      [destination typeKey:keyValue modifierFlags:modifierFlags];
       ~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

oh. - (void)typeKey:(id)arg1 modifierFlags:(unsigned long long)arg2; may need in XCUIElement.h? then it is available since Xcode 15

Limited it to Xcode 15+

@mykola-mokhnach mykola-mokhnach merged commit aaf70c9 into master Oct 26, 2023
43 of 46 checks passed
@mykola-mokhnach mykola-mokhnach deleted the typekey branch October 26, 2023 14:52
github-actions bot pushed a commit that referenced this pull request Oct 26, 2023
## [5.12.0](v5.11.7...v5.12.0) (2023-10-26)

### Features

* Add an endpoint for keyboard input ([#797](#797)) ([aaf70c9](aaf70c9))
@github-actions
Copy link

🎉 This PR is included in version 5.12.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@@ -543,6 +546,48 @@ + (NSString *)timeZone
}
return FBResponseWithOK();
}

#if __clang_major__ >= 15
Copy link
Member

@KazuCocoa KazuCocoa Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or add - (void)typeKey:(id)arg1 modifierFlags:(unsigned long long)arg2; in https://github.com/appium/WebDriverAgent/blob/master/PrivateHeaders/XCTest/XCUIElement.h and check with selector as we do usually?

On my local Xcode 14 only addressed this method, typeKey, but others such as XCUIKeyboardKeyDelete existed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to focus on current OS support as Apple updates its stuff very fast.
Although feel free to test it locally and create a PR if needed to add the support of older versions.

Copy link
Member

@KazuCocoa KazuCocoa Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, i'm interested in making wda package work for both iOS 17 and 16 real devices with iOS 17's way (built with Xcode 15), so no embedded testing frameworks from .app. I guessed at least a selector might be needed for iOS 16 to not crash the process with the endpoint call. I'll check for it, then create a pr to care about the case

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just chiming in here, I'm interested in IOS 16 as well, as there currently isn't any "nice" way of mounting developer image on IOS 17 on Linux.

Otherwise, I understand wanting to support the latest, with the fast movement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants