appium: Appium 1.6.0-beta1: iOS: Failed to set PickerWheel value
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
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 37 (13 by maintainers)
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<IOSElement> 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)
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”)