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

port send keys for an active element #122

Merged
merged 2 commits into from
Aug 4, 2018

Conversation

KazuCocoa
Copy link
Member

@KazuCocoa KazuCocoa commented Aug 4, 2018

With W3C, it will be

driver.action.send_keys('xxxx').perform

But we need to implement type: key in action in server side => example /~https://github.com/appium/appium-espresso-driver/pull/192/files

@KazuCocoa KazuCocoa merged commit 24d2a62 into appium:master Aug 4, 2018
@KazuCocoa KazuCocoa deleted the add_send_keys_active_elements branch August 4, 2018 06:30
@KazuCocoa
Copy link
Member Author

)> @@driver.action.send_keys("hello").perform
Selenium::WebDriver::Error::UnknownError: An unknown server-side error occurred while processing the command. Original error: Error Domain=com.facebook.WebDriverAgent Code=1 "Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'" UserInfo={NSLocalizedDescription=Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'}
from UnknownError: An unknown server-side error occurred while processing the command. Original error: Error Domain=com.facebook.WebDriverAgent Code=1 "Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'" UserInfo={NSLocalizedDescription=Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'}
[HTTP] --> POST /wd/hub/session/de61314a-deb9-4ea7-a8e8-76411edde37d/actions
[HTTP] {"actions":[{"type":"key","id":"keyboard","actions":[{"type":"keyDown","value":"h"},{"type":"keyUp","value":"h"},{"type":"keyDown","value":"e"},{"type":"keyUp","value":"e"},{"type":"keyDown","value":"l"},{"type":"keyUp","value":"l"},{"type":"keyDown","value":"l"},{"type":"keyUp","value":"l"},{"type":"keyDown","value":"o"},{"type":"keyUp","value":"o"}]}]}
[debug] [W3C] Calling AppiumDriver.performActions() with args: [[{"type":"key","id":"keyboard","actions":[{"type":"keyDown","value":"h"},{"type":"keyUp","value":"h"},{"type":"keyDown","value":"e"},{"type":"keyUp","value":"e"},{"type":"keyDown","value":"l"},{"type":"keyUp","value":"l"},{"type":"keyDown","value":"l"},{"type":"keyUp","value":"l"},{"type":"keyDown","value":"o"},{"type":"keyUp","value":"o"}]}],"de61314a-deb9-4ea7-a8e8-76411edde37d"]
[debug] [XCUITest] Executing command 'performActions'
[debug] [XCUITest] Received the following W3C actions: [
[debug] [XCUITest]   {
[debug] [XCUITest]     "type": "key",
[debug] [XCUITest]     "id": "keyboard",
[debug] [XCUITest]     "actions": [
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "h"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "h"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "e"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "e"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "o"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "o"
[debug] [XCUITest]       }
[debug] [XCUITest]     ]
[debug] [XCUITest]   }
[debug] [XCUITest] ]
[debug] [XCUITest] Preprocessed actions: [
[debug] [XCUITest]   {
[debug] [XCUITest]     "type": "key",
[debug] [XCUITest]     "id": "keyboard",
[debug] [XCUITest]     "actions": [
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "h"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "h"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "e"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "e"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "l"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyDown",
[debug] [XCUITest]         "value": "o"
[debug] [XCUITest]       },
[debug] [XCUITest]       {
[debug] [XCUITest]         "type": "keyUp",
[debug] [XCUITest]         "value": "o"
[debug] [XCUITest]       }
[debug] [XCUITest]     ]
[debug] [XCUITest]   }
[debug] [XCUITest] ]
[debug] [JSONWP Proxy] Matched '/actions' to command name 'performActions'
[debug] [JSONWP Proxy] Proxying [POST /actions] to [POST http://localhost:8100/session/EF2C676C-3D41-4472-B37A-87ED1B507FA0/actions] with body: {"actions":[{"type":"key","id":"keyboard","actions":[{"type":"keyDown","value":"h"},{"type":"keyUp","value":"h"},{"type":"keyDown","value":"e"},{"type":"keyUp","value":"e"},{"type":"keyDown","value":"l"},{"type":"keyUp","value":"l"},{"type":"keyDown","value":"l"},{"type":"keyUp","value":"l"},{"type":"keyDown","value":"o"},{"type":"keyUp","value":"o"}]}]}
[debug] [JSONWP Proxy] Got response with status 200: {"value":"Error Domain=com.facebook.WebDriverAgent Code=1 \"Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'\" UserInfo={NSLocalizedDescription=Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'}","sessionId":"EF2C676C-3D41-4472-B37A-87ED1B507FA0","status":13}
[debug] [MJSONWP] Matched JSONWP error code 13 to UnknownError
[W3C] Encountered internal error running command:  {"jsonwpCode":13,"error":"unknown error","w3cStatus":500,"_stacktrace":null} UnknownError: An unknown server-side error occurred while processing the command. Original error: Error Domain=com.facebook.WebDriverAgent Code=1 "Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'" UserInfo={NSLocalizedDescription=Only actions of 'pointer' type are supported. 'key' is given instead for action with id 'keyboard'}
[W3C]     at errorFromMJSONWPStatusCode (/Users/kazuaki/GitHub/appium/node_modules/appium-base-driver/lib/protocol/errors.js:787:10)
[W3C]     at ProxyRequestError.getActualError (/Users/kazuaki/GitHub/appium/node_modules/appium-base-driver/lib/protocol/errors.js:681:14)
[W3C]     at JWProxy.command$ (/Users/kazuaki/GitHub/appium/node_modules/appium-base-driver/lib/jsonwp-proxy/proxy.js:354:19)
[W3C]     at tryCatch (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:67:40)
[W3C]     at GeneratorFunctionPrototype.invoke [as _invoke] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:315:22)
[W3C]     at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:100:21)
[W3C]     at GeneratorFunctionPrototype.invoke (/Users/kazuaki/GitHub/appium/node_modules/babel-runtime/regenerator/runtime.js:136:37)
[W3C]     at <anonymous>
[HTTP] <-- POST /wd/hub/session/de61314a-deb9-4ea7-a8e8-76411edde37d/actions 500 114 ms - 1757
[HTTP]

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

Successfully merging this pull request may close these issues.

1 participant