0
votes

I am trying to automate the android hybrid app using protractor. I am trying to input the date using sendkeys command, but not able to enter the date. When I click on dob(Date of birth), it pop-ups date picker. But i am trying to send the date of birth field without date picker pop-up.

Here is my code below:

var dob=element(by.css('input[id="personalInfoDateOfBirth"]'));
dob.sendKeys('11/05/1981').then(function() {
    console.log('Date of birth is entered');
});

Kindly Advice...

1

1 Answers

0
votes

Try this:

List<WebElement> date = driver.findElements(By.className("android.widget.DatePicker"));
    date.get(0).sendKeys("Apr");
    date.get(1).sendKeys("12");
    date.get(2).sendKeys("1990");