I am currently working on an Ionic hybrid mobile application and in the process of creating some protractor tests. For testing against a simulator version of the app, I am relying on Appium.
One particular challenge I've encountered involves a registration form with several inputs, including one for date input:
<input type="date" name="dob" ng-model="vm.register.dob" ng-max="vm.dobMax" required>
While I have successfully populated all text inputs using input.sendKeys("John Doe");
, I seem to be encountering issues with the date input. I've tried various approaches, such as:
var dobInput = element(by.model('vm.register.dob'));
dobInput.sendKeys("01-01-2015");
dobInput.sendKeys("01012015");
Even attempting to trigger the native date picker by clicking on the input directly hasn't yielded results: dobInput.click();
Despite my efforts, I haven't been able to populate the date input with any value. Any insights on what might be going wrong?
Appreciate your help!