sakthi vel
sakthi vel

Reputation: 21

Using Appium - Unable to access date picker on mobile web app on android platform

I have created test script for mobile web application using appium.

The issues are given below

  1. I'm not able to get date picker id's in DOM windows [Android default date picker populated in my web app which is available in setting menu of android mobile]

So how can i access date picker on mobile web application.

2.I tried copied DATE without opened date picker via java script. Date has displayed successfully but if i tried to navigating next screen, error has been displayed as pl entered DATE.

Please find the below code which i have taken DOM windows for text box ids[Date value should be stored in text box]

<input tabindex="-1" type="date" data-ng-model="firstMovedInDetails" data-ng-blur="firstMovedIn(firstMovedInDetails)" name="firstMovedInDetails" class="field mdot ng-pristine ng-valid selectboxblank" input-focus="" select-box="" resize-box="" style="width: 280px;">

Please find the below which I have written java script to paste the DATE in text box, without opened date picker

( (JavascriptExecutor)driver).executeScript ("var dob = document.getElementsByName('firstMovedInDetails')[0];dob.value='2010-01-06';"); 

The mobile web application developed by anjularjs. Kindly let me know whether how can I access date picker or navigating on next page with date value.

Thanks in advance!

enter image description here

Upvotes: 2

Views: 1173

Answers (1)

Naman
Naman

Reputation: 32036

The default DatePicker in android has the IDs associated. Could you check once in the dev branch and confirm if they have not updated the same. Is they did, you would have to access those objects to SET the date.

Upvotes: 0

Related Questions