Is this possible to test with protractor?
ericfrancis opened this issue · 1 comments
ericfrancis commented
Is this possible to test with protractor?
ericfrancis commented
Was able to test with
// protractor spec
// click date
dateElement.click();
// get the navigation arrows
const datePickerArrows = dateElement.$$( '.datepicker__calendar__nav__arrow' );
// click right arrow
const datePickerRightArrow = datePickerArrows.get( 1 );
datePickerRightArrow.click();
// get the days
// only actual dates have span elements
const datePickerDays = dateElement.$$( '.datepicker__calendar__month__day > span' );
return datePickerDays.count().then( count => {
return datePickerDays.get( count - daysFromEndOfMonth ).click();
});