Tried setting values for date, month and year individually:
WindowsElement day = AppDriver.FindElementByXPath("//attribute::[contains(., ‘Day’)]/…");
day.SendKeys(“20”);
WindowsElement month = AppDriver.FindElementByXPath("//attribute::[contains(., ‘Month’)]/…");
month.SendKeys(“2”);
WindowsElement year = AppDriver.FindElementByXPath("//attribute::*[contains(., ‘Year’)]/…");
year.SendKeys(“2014”);
AppDriver.FindElementByAccessibilityId(“AcceptButton”).Click();
Both the code snippets above does not throw any exception but fails to set date on the control. Is sendkeys() the right API to set date on datepicker or should it be done differently?
Is setting datepicker value for UWP supported by winappdriver at this point?
Is setValue() API available for UWP?
I could find only SetImmediateValue() instead which doesnt seen to be supported by appium for UWP.
I see below error on appium server when using SetImmediateValue()
[WinAppDriver] [STDOUT] {“status”:9,“value”:{“error”:“unknown command”,“message”:“Command not recognized: POST: /session/F7B266C3-537A-43D8-AC36-E999AA7C10CA/appium/element/42.4064534.2.53/value”}}
[MJSONWP] Encountered internal error running command: {“jsonwp”:{“status”:9,“value”:{“error”:“unknown command”,“message”:“Command not recognized: POST: /session/F7B266C3-537A-43D8-AC36-E999AA7C10CA/appium/element/42.4064534.2.53/value”}}} ProxyRequestError: Could not proxy command to remote server. Original error: 404 - {“status”:9,“value”:{“error”:“unknown command”,“message”:“Command not recognized: POST: /session/F7B266C3-537A-43D8-AC36-E999AA7C10CA/appium/element/42.4064534.2.53/value”}}
at JWProxy.proxy$ (C:\Users\nxm0820\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\appium-base-driver\lib\jsonwp-proxy\proxy.js:144:13)
at tryCatch (C:\Users\nxm0820\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:67:40)
at GeneratorFunctionPrototype.invoke [as _invoke] (C:\Users\nxm0820\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:315:22)
at GeneratorFunctionPrototype.prototype.(anonymous function) [as throw] (C:\Users\nxm0820\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:100:21)
at GeneratorFunctionPrototype.invoke (C:\Users\nxm0820\AppData\Local\Programs\appium-desktop\resources\app\node_modules\appium\node_modules\babel-runtime\regenerator\runtime.js:136:37)
[HTTP] ← POST /wd/hub/session/400562c5-8e13-4bba-867d-58ddb9d7abc3/appium/element/42.4064534.2.53/value 500 9 ms - 236