angular-datepicker
angular-datepicker copied to clipboard
How to set date with protractor?
Hi, I need to set date inside a protractor test to an input that is readonly.
<input date-time auto-close="true" format="yyyy" readonly min-view="year" ng-model="bookCtrl.book.published" class="form-control" id="published" type="text" placeholder="When was it written?" required>
Running the code below doesn't insert anything into the input. It works if I disable datepicker hiding on blur though.
element(by.id("published")).click();
element(by.css("div.date-picker-date-time table span")).click();
What's the proper way to use it for testing?
element(by.model('bookCtrl.book.published')).click();
Watch this video to automate angular material calendar https://www.youtube.com/watch?v=T8QRDQjt5lw&t=12s