I am working on ionic 2, for automation testing i have used appium and webdriver.io , i'm able to set value where input type is password or email, generally text input type.
<input id="i.email" type="email">
and setting value using
client.setValue('//*[@id="i.email"]', username)
but i want to set value into date picker but i'm unable to do so.. my code is as below..
<ion-datetime id="d.fromDt" pickerFormat="MMM DD YYYY"
[(ngModel)]="fromDate" doneText="ok" cancelText="clear"
displayFormat="DD - MM - YYYY"> </ion-datetime>
and i have tried setting value using
-- client.setValue('//*[@id="d.fromDt"]', 'May 22 2018')
-- client.element('//*[@id="d.fromDt"]').setValue('May 22 2018')
but nothing is working. also getting response from appium invalid element state: Element must be user-editable in order to clear it. can anyone help me to solve this?