I am trying to automate a web app and there are several date fields where both keystrokes can be sent to type the date or one can click the calendar icon to pick a date from a calendar date picker.
Problem is, the date field just has one id, which works for send keystrokes. However, it doesn't invoke the actual calendar date picker.
The html looks like this:
<div class="form-group row">
<label class="control-label col-md-2 font-weight-bold text-right" for="fromDate">FromDate</label>
<div class="col-md-10">
<input class="datepicker form-control text-box single-line" data-val="true" data-val-required="The FromDate field is required." id="FromDate" name="FromDate" type="date" value="">
<span class="text-danger field-validation-valid" data-valmsg-for="FromDate" data-valmsg-replace="true"></span>
</div>
</div>
I have tried using mouse.move() to just click on the calendar icon of the field using x and y coordinates but it hasn't worked very well. Is there a way so I can click the actual calendar icon to open it, sift through months and years and pick a date?