Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Problem with getValue and Appium 1.8.0 on Android #14

Open
christian-bromann opened this issue Jan 25, 2019 · 1 comment
Open

Problem with getValue and Appium 1.8.0 on Android #14

christian-bromann opened this issue Jan 25, 2019 · 1 comment
Labels
Bug🐛 help wanted Extra attention is needed v4

Comments

@christian-bromann
Copy link
Contributor

From @ianrenauld on May 8, 2018 20:18

The problem

This is very similar to #2574. With Appium 1.8.0 I cannot getValue from an <input> field on Android (Hybrid App - it works fine on iOS). We receive no RESULT, but if I switch to the older, non-W3C calls, it works. The error from Appium seems to be "unknown command", but we already check for this value. The difference from before (#2574) is that this call seems to timeout, so I don't think we ever get to the check for unknown command.

Environment

  • WebdriverIO version: 4.12.0
  • Node.js version: 8.11.1
  • wdio testrunner, running synchronously
  • Appium 1.8.0

Details + Logs

Here is the log with WebdriverIO 4.9.9 (uses non-W3C calls):

[14:48:29]  COMMAND     POST     "/wd/hub/session/aac6fead-ac07-4d34-9799-5ca20ffa2103/element"
[14:48:29]  DATA                {"using":"name","value":"username"}
[14:48:29]  RESULT              {"ELEMENT":"0.7004955660714918-3"}
[14:48:29]  COMMAND     GET      "/wd/hub/session/aac6fead-ac07-4d34-9799-5ca20ffa2103/element/0.7004955660714918-3/attribute/value"
[14:48:29]  DATA                {}
[14:48:29]  RESULT              "toto"

Here is the log with WebdriverIO 4.12.0 (uses W3C calls):

[14:55:57]  COMMAND     POST     "/wd/hub/session/9c667f8e-d46b-4d32-bb0b-75af98e51557/element"
[14:55:57]  DATA                {"using":"name","value":"username"}
[14:55:57]  RESULT              {"ELEMENT":"0.13486487362687805-3"}
[14:55:57]  COMMAND     GET      "/wd/hub/session/9c667f8e-d46b-4d32-bb0b-75af98e51557/element/0.13486487362687805-3/property/value"
[14:55:57]  DATA                {}

After this last line, nothing happens until the test timeout. From appium.log:

[debug] [JSONWP Proxy] Proxying [GET /wd/hub/session/ce7ca87d-6679-4802-ad1c-48196811f466/element/0.8170637210466369-3/property/value] to [GET http://127.0.0.1:8000/wd/hub/session/7ea27f9476f8927b9d13a1fb22201ad4/element/0.8170637210466369-3/property/value] with body: {}
[JSONWP Proxy] Got unexpected response: unknown command: session/7ea27f9476f8927b9d13a1fb22201ad4/element/0.8170637210466369-3/property/value

I tried playing around with the utilities.js helper file, but the isUnknownCommand method already checks for "unknown command". My feeling is that this method is never actually called. I think there is a failure in waiting for the response in the RequestHandler.js file. Unfortunately, my understanding of what is going on in there is too limited for me to find a solution...

Code To Reproduce Issue

For any <input> element in an Hybrid app, just do getValue() on it.

Copied from original issue: webdriverio/webdriverio#2726

@christian-bromann christian-bromann added Bug🐛 help wanted Extra attention is needed v4 labels Jan 25, 2019
@christian-bromann
Copy link
Contributor Author

From @prevostc on October 12, 2018 15:47

Same issue for me with appium 1.8.0 and webdriverio v4.13.2.
We do not use appium 1.9.1 because 1.8.0 is the latest supported by browserstack.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug🐛 help wanted Extra attention is needed v4
Projects
None yet
Development

No branches or pull requests

1 participant