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

Appium 1.6.0-beta1: iOS: Failed to set PickerWheel value #6873

Closed
amedvedjev opened this issue Sep 21, 2016 · 37 comments
Closed

Appium 1.6.0-beta1: iOS: Failed to set PickerWheel value #6873

amedvedjev opened this issue Sep 21, 2016 · 37 comments

Comments

@amedvedjev
Copy link
Contributor

The problem

Set wheel value does not work any more with latest Appium.

Environment

  • Appium version: 1.6.0-beta1
  • Last Appium version that did not exhibit the issue (if applicable): 1.5.3
  • Desktop OS/version used to run Appium: OS X 10.11.6
  • Node.js version (unless using Appium.app|exe):
  • Mobile platform/version under test:
  • Real device or emulator/simulator: Simulator 10.0
  • Appium CLI or Appium.app|exe:

Details

Tried:
((IOSElement)driver.findElements(MobileBy.className("XCUIElementTypePickerWheel")).get(0)).setValue(countryName); ((IOSElement)driver.findElements(MobileBy.className("XCUIElementTypePickerWheel")).get(0)).sendKeys(countryName);

Link to Appium logs

debug] [XCUITest] Executing command 'setValueImmediate'
[XCUITest] There is currently no way to bypass typing using XCUITest. Setting value through keyboard
[JSONWP Proxy] Proxying [POST /element/F725FBF8-4D89-45EF-A7EC-1EBA2D61E9F4/value] to [POST http://localhost:8100/session/05D96C05-81F1-4089-B914-BD6A7F8259C0/element/F725FBF8-4D89-45EF-A7EC-1EBA2D61E9F4/value] with body: {"value":["N","e","t","h","...
[debug] [WebDriverAgent] Sim: Sep 21 11:51:31 aleks XCTRunner[28375]: Enqueue Failure: UI Testing Failure - Requested adjust to value '(
[debug] [WebDriverAgent] Sim: N,
[debug] [WebDriverAgent] Sim: e,
[debug] [WebDriverAgent] Sim: t,
[debug] [WebDriverAgent] Sim: h,
[debug] [WebDriverAgent] Sim: e,
[debug] [WebDriverAgent] Sim: r,
[debug] [WebDriverAgent] Sim: l,
[debug] [WebDriverAgent] Sim: a,
[debug] [WebDriverAgent] Sim: n,
[debug] [WebDriverAgent] Sim: d,
[debug] [WebDriverAgent] Sim: s
[debug] [WebDriverAgent] Sim: )' which is not one of the possible values Austria, Belgium, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland, Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Netherlands, Norway, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden, Switzerland, United Kingdom for the picker wheel "Austria" PickerWheel /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1

@triager triager added the Needs Triage bugs which are not yet confirmed label Sep 21, 2016
@amedvedjev amedvedjev changed the title Appium 1.6.0-beta1: Failed to set PickerWheel value Appium 1.6.0-beta1: iOS: Failed to set PickerWheel value Sep 21, 2016
@urimagisto
Copy link

same issue here, with same setup

On Wed, Sep 21, 2016 at 11:57 AM, Aleksei notifications@github.com wrote:

The problem

Set wheel value does not work any more with latest Appium.
Environment

  • Appium version: 1.6.0-beta1
  • Last Appium version that did not exhibit the issue (if applicable):
    1.5.3
  • Desktop OS/version used to run Appium: OS X 10.11.6
  • Node.js version (unless using Appium.app|exe):
  • Mobile platform/version under test:
  • Real device or emulator/simulator: Simulator 10.0
  • Appium CLI or Appium.app|exe:

Details

Tried:
((IOSElement)driver.findElements(MobileBy.className("
XCUIElementTypePickerWheel")).get(0)).setValue(countryName);
((IOSElement)driver.findElements(MobileBy.className("
XCUIElementTypePickerWheel")).get(0)).sendKeys(countryName);
Link to Appium logs

debug] [XCUITest] Executing command 'setValueImmediate'
[XCUITest] There is currently no way to bypass typing using XCUITest.
Setting value through keyboard
[JSONWP Proxy] Proxying [POST /element/F725FBF8-4D89-45EF-A7EC-1EBA2D61E9F4/value]
to [POST http://localhost:8100/session/05D96C05-81F1-4089-B914-
BD6A7F8259C0/element/F725FBF8-4D89-45EF-A7EC-1EBA2D61E9F4/value] with
body: {"value":["N","e","t","h","...
[debug] [WebDriverAgent] Sim: Sep 21 11:51:31 aleks XCTRunner[28375]:
Enqueue Failure: UI Testing Failure - Requested adjust to value '(
[debug] [WebDriverAgent] Sim: N,
[debug] [WebDriverAgent] Sim: e,
[debug] [WebDriverAgent] Sim: t,
[debug] [WebDriverAgent] Sim: h,
[debug] [WebDriverAgent] Sim: e,
[debug] [WebDriverAgent] Sim: r,
[debug] [WebDriverAgent] Sim: l,
[debug] [WebDriverAgent] Sim: a,
[debug] [WebDriverAgent] Sim: n,
[debug] [WebDriverAgent] Sim: d,
[debug] [WebDriverAgent] Sim: s
[debug] [WebDriverAgent] Sim: )' which is not one of the possible values
Austria, Belgium, Bulgaria, Croatia, Cyprus, Czech Republic, Denmark,
Estonia, Finland, France, Germany, Greece, Hungary, Iceland, Ireland,
Italy, Latvia, Liechtenstein, Lithuania, Luxembourg, Malta, Netherlands,
Norway, Poland, Portugal, Romania, Slovakia, Slovenia, Spain, Sweden,
Switzerland, United Kingdom for the picker wheel "Austria" PickerWheel
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/
WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#6873, or mute the thread
https://github.com/notifications/unsubscribe-auth/ANVEjOJDQHBDU5O_lKGq8_6Xlup3BrVRks5qsPFrgaJpZM4KCjiG
.

@imurchie
Copy link
Contributor

This isa repeatable failure. Working on the upstream project to get a fix.

Thanks!

@jlipps
Copy link
Member

jlipps commented Sep 21, 2016

@imurchie seems like WDA doesn't know how to handle array of values according to the spec?

@imurchie
Copy link
Contributor

It does, except for picker wheels. I've just submitted a PR to fix this issue.

facebook-github-bot pushed a commit to facebookarchive/WebDriverAgent that referenced this issue Sep 22, 2016
Summary:
I'm not at all certain that this is the correct way to do this, but it fixes the problem.

When sending text to a PickerWheel, in order to set it, the array value is not found in the possible values and it is rejected. So concatenate the array into a string.

See appium/appium#6873
Closes #295

Differential Revision: D3907080

Pulled By: marekcirkos

fbshipit-source-id: 11bb2201e3672b8ad5c3eb826fcb6a573aa2ef6a
@amedvedjev
Copy link
Contributor Author

how to grab changes? reinstall with
npm i -g webpack

@imurchie
Copy link
Contributor

You won't be able to yet, unless you run from source.

I'll post here once the PR to update the upstream project is in.

@imurchie
Copy link
Contributor

If you update Appium you should get these changes.

Updated in appium-xcuitest-driver@2.0.16.

@amedvedjev
Copy link
Contributor Author

damn! working just great! speed if fantastic comparing with older UIAutomation.

@appiumnovice
Copy link

appiumnovice commented Oct 5, 2016

Hi, I still have this problem with appium 1.6.0-beta1 witch contains appium-xcuitest-driver@2.0.23.
I tried to set "ven., 7 oct." (or "7 oct.") in wheel containing "mar., 4 oct.".
Appium log: "Calling AppiumDriver.setValue() with args: [["ven., 7 oct."], "2B55..."
And : "Enqueue Failure: UI Testing Failure - Internal error: unable to find current value '(null)' in possible values 15 août, 16 août, ... 7 oct., ... for the picker wheel "mar., 4 oct." PickerWheel /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent/WebDriverAgentRunner/UITestingUITests.m 35 1"

@imurchie
Copy link
Contributor

imurchie commented Oct 5, 2016

Can you provide more of the log? We need to know what is being sent in.

@appiumnovice
Copy link

I added Appium logs, but seems poor in a debug mode

Le 5 oct. 2016 18:31, "Isaac A. Murchie" notifications@github.com a
écrit :

Can you provide more of the log? We need to know what is being sent in.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6873 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKhCmockrq2ZkcP8qNluuYzNf03equsLks5qw9DdgaJpZM4KCjiG
.

@imurchie
Copy link
Contributor

imurchie commented Oct 7, 2016

I don't see any logs.

@appiumnovice
Copy link

I put a Gist link to Appium log

Le 7 oct. 2016 15:46, "Isaac A. Murchie" notifications@github.com a
écrit :

I don't see any logs.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6873 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKhCmubKSUIVdpybOEdtFZaRaoCZN6V3ks5qxk0egaJpZM4KCjiG
.

@imurchie
Copy link
Contributor

imurchie commented Oct 7, 2016

Where? You need to post a link here.

@appiumnovice
Copy link

Sorry, I added it to the post.

Here is the poor log from Appium for the moment the script tries to get
items by xpath:
https://gist.github.com/appiumnovice/b067a93e4471f2c84013d8b6845868c4

2016-10-07 15:58 GMT+02:00 Isaac A. Murchie notifications@github.com:

Where? You need to post a link here.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6873 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKhCmmioKx9c2MJnh_Tk2q2eUlzpwiWOks5qxlAWgaJpZM4KCjiG
.

@imurchie
Copy link
Contributor

imurchie commented Oct 7, 2016

I don't understand what this has to do with the original problem. What is this log? Why am I looking at it?

@appiumnovice
Copy link

Well, I'll try to be more clear

I do a findElementsByXpath() and I retrieve a number of items.
But when I try to retrieve values from these items, I didn't retrieve the
values from the good property for all items.

I look for retrieve the value of the property "trainNameLabel" for all
items.

In many cases, it returns the value of the property "trainNameLabel" (it's
what I asked. ex: TER N°843508),
but sometimes I have the value of the property "destinationLabel" (ex:
Valenciennes) or the hour (ex : 11 Heure 46 Minute).
Why I got theses values?

I select only XCUIElementTypeStaticText items with @name=trainNameLabel and
when I get values, some come from XCUIElementTypeStaticText with
@name="destinationLabel" or "11 Heure 46 Minute " !

Here is an example of tree of items for which I want just to get the value
of the last "XCUIElementTypeStaticText" (with name="trainNameLabel"):

<XCUIElementTypeCell name="SUTrainBoardDefaultCell" label="" value=""

dom="" enabled="true" valid="true" visible="true" hint=""
path="/0/0/0/0/0/0/1/0/0/0/1/0/2" x="0" y="139" width="414" height="75">








The Appium log I sent only shows the moment when findElementsByXpath()
instruction is run. But I haven't seen an error in log.

I really don't know how to proceed to find the root cause of this problem.

Thank you in advance for your help.

2016-10-07 16:03 GMT+02:00 Isaac A. Murchie notifications@github.com:

I don't understand what this has to do with the original problem. What is
this log? Why am I looking at it?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6873 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKhCmvr1AsNYB3take3UXCVCjZ5p_9isks5qxlElgaJpZM4KCjiG
.

@ngreeney
Copy link

ngreeney commented Oct 7, 2016

@appiumnovice This is not an error. You are asking how to do something not reporting an error as far as I can tell. Try asking here: https://discuss.appium.io/

If it really is an error, you need to post what commands you are explicitly sending to appium (like what python/java/etc command) and what you are receiving back from appium.

Also this does not have to do with the picker wheel issue so please start another post with all the correct logs if you think it is still an error.

@appiumnovice
Copy link

Issac, i'm really really really sorry!!!

I just understood than I send you elements for another problem !!! Post
#6945 that I opened 2 days ago!

For this problem of Picker, I'm run the test again and send you Appium logs.

2016-10-07 16:03 GMT+02:00 Isaac A. Murchie notifications@github.com:

I don't understand what this has to do with the original problem. What is
this log? Why am I looking at it?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#6873 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AKhCmvr1AsNYB3take3UXCVCjZ5p_9isks5qxlElgaJpZM4KCjiG
.

@appiumnovice
Copy link

I posted a new issue : #6962

PS: is it possible to remove previous posts that finally have nothing to do with the problem described in this post to avoid visitors to be disturbed ?

@suganeby
Copy link

suganeby commented Jan 9, 2017

@appiumnovice, Did you solve the picker issue? I do have issue in setting value to the picker wheel. Let me know if you have any solution.
I am using appium 1.6.3 on a real device ios 10.

@kcinman11358
Copy link

kcinman11358 commented Jan 13, 2017

I'm running Appium 1.6.3 via command line and using iphone6 9.3 sim.

I am unable to use send keys, where as old version of appium i could.

Old code:
driver.findElements(By.ClassName("UIATextField")).ElementAt(1).SendKeys(account);
driver.findElement(By.ClassName("UIAPickerWheel")).SendKeys(account);

@Joekannan
Copy link

Hi All,

Please let me know the solution for this issue.

SendKeys were working in old version. What is the logic to deal with PickerWheel.

It is very urgent for me to complete the assignment. stuck into this.

@amedvedjev
Copy link
Contributor Author

@Joekannan

driver.findElement(MobileBy.className("XCUIElementTypePickerWheel")).setValue("your_value");

@Joekannan
Copy link

@amedvedjev

Thanks for the prompt update.

Unfortunately, this is also not working for me 👎 .

And I am getting the below error in Terminal - Appium logs
[debug] [iProxy] recv failed: Resource temporarily unavailable
[debug] [iProxy] recv failed: Operation not permitted

@amedvedjev
Copy link
Contributor Author

Move to 1.6.4-beta

@Joekannan
Copy link

@amedvedjev

I am very new to iOS Automation. i have installed Appium 1.6.4-beta from terminal. After the installation if i launch the appium from Terminal Appium 1.6.3 is launching.

Logs are below:
Last login: Wed Mar 1 16:29:24 on ttys000
DTS-Mini:~ automation$ npm install appium@1.6.4-beta
npm WARN deprecated babel-core@5.8.24: Babel 5 is no longer being maintained. Upgrade to Babel 6.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated line-numbers@0.2.0: Copy its ~20 LOC directly into your code instead.
automation@1.0.0 /Users/automation
└── appium@1.6.4-beta

npm WARN automation@1.0.0 No description
npm WARN automation@1.0.0 No repository field.
DTS-Mini:~ automation$ sudo npm install appium@1.6.4-beta
Password:
npm WARN deprecated babel-core@5.8.24: Babel 5 is no longer being maintained. Upgrade to Babel 6.
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated line-numbers@0.2.0: Copy its ~20 LOC directly into your code instead.
automation@1.0.0 /Users/automation
└── appium@1.6.4-beta

npm WARN automation@1.0.0 No description
npm WARN automation@1.0.0 No repository field.
DTS-Mini:~ automation$ appium --default-capabilities '{"newCommandTimeout": 3000}'
[Appium] Welcome to Appium v1.6.3 (REV d9b43638333b47dd8ed8bcbbb97ef9f8c0ad5756)
[Appium] Non-default server args:
[Appium] defaultCapabilities: { newCommandTimeout: 3000 }
[Appium] Default capabilities, which will be added to each request unless overridden by desired capabilities:
[Appium] newCommandTimeout: 3000
[Appium] Appium REST http interface listener started on 0.0.0.0:4723

Your timely help would be appreciated. Thanks

@appiumnovice
Copy link

appiumnovice commented Mar 1, 2017 via email

@Joekannan
Copy link

@appiumnovice

I am getting the below terminal error

Last login: Wed Mar 1 17:28:51 on ttys001
DTS-Mini:~ automation$ npm install -g appium@1.6.4-beta
npm ERR! addLocal Could not install /Users/automation/-g
npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "appium@1.6.4-beta"
npm ERR! node v6.9.5
npm ERR! npm v4.2.0
npm ERR! path /Users/automation/-g
npm ERR! code ENOENT
npm ERR! errno -2
npm ERR! syscall open

npm ERR! enoent ENOENT: no such file or directory, open '/Users/automation/-g'
npm ERR! enoent ENOENT: no such file or directory, open '/Users/automation/-g'
npm ERR! enoent This is most likely not a problem with npm itself
npm ERR! enoent and is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! Please include the following file with any support request:
npm ERR! /Users/automation/.npm/_logs/2017-03-01T17_29_49_831Z-debug.log
DTS-Mini:~ automation$

@Joekannan
Copy link

I have seen a separate thread for this issue, where they have mentioned it is a non-appium issue and developer needs to change the Wheel picker implementation to identify the elements.

Below is the URL where i found this information:-
#6962

Can anyone please confirm this, is there any other alternate or reliable workaround to deal with XCUIElementTypePickerWheel Element..

Please it is very urgent. Your help is much appreciated.

@suganeby
Copy link

suganeby commented Mar 2, 2017

I had the same issue. My developer couldn't change the implementation for some reasons.
I tried below work around with points and dimensions. It works.

List wheels = driver.findElements(MobileBy.className("XCUIElementTypePickerWheel"))

Point p1=wheels.get(0).getLocation()
Dimension d1 = wheels.get(0).getSize()

//-100 scrolls up (taps the value below the currently selected value)
driver.tap(1, p1.getX(), p1.getY() + d1.getHeight() -100, 500)

//+100 scrolls down (taps the value above the currently selected value)
driver.tap(1, p1.getX(), p1.getY() +100, 500)

@Joekannan
Copy link

@suganeby
Thanks a lot for your help. Its absolutely working fine.

@kamikrazeguy
Copy link

@suganeby Thanks for the implementation. I've been scouring for a workaround for a viewForRow implementation and this was the only solution that worked for me. I really appreciate your contribution!

@imurchie imurchie removed the Needs Triage bugs which are not yet confirmed label Apr 13, 2017
@kamikrazeguy
Copy link

Per @suganeby

I just installed appium 1.6.4. Now I am able to set values to the picker directly.

List wheels = driver.findElements(MobileBy.className("XCUIElementTypePickerWheel"))
wheels.get(0).setValue("12")

@SamyQAZ
Copy link

SamyQAZ commented May 25, 2018

Was anyone able to get solution for this issue?
I am facing the same issue with Appium.app version 1.6.1.
Not sure how to select date from wheel picker.

Tried to use,
xpath=//*[@XCUIElementTypePickerWheel='XCUIElementTypeAny',1,"2020"]
But seem something wring in this.
Does anyone know whats wrong with the xpath?

@suganeby
Copy link

@SamyQAZ ,
can you try my solution above? It uses class name instead of xpath.

@lock
Copy link

lock bot commented May 25, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators May 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests