Handle Date in Appium

let’s see, How can you Handle Date in Appium. In the previous tutorials, You have seen many operations on App using Appium. In this tutorial, we will see how can handle the Date Elements using Appium.

 

Andriod Apps contains DatePicker to support the Date functionality. It can be inline or pop-up.

In Android Date and Time use the same DatePicket widgets. So we are explaining how can you manage the Date, In the same way, you can implement your script for Time management in Android app.

 

In our example we are using the Android App Samvaad- Social Network.(You can get the App from here – Download Samvaad)

 

We will try to signup on the App. For this, we need to fill the Date of Birth in this app. So steps will look like –

  • Click on Sign-Up button.

  • Click on DOB Button.

  • Pick the Date and click on Done button.

Script will look like this –

Date Picker in Appium

 

In the above Screenshot, you can see the DatePicker widget of Andriod app.

Here we have one issue, ID of Month , Date and Year are same. So how can you select the Month, Date and Year ?

 

To select the Month, Date & Year we will use x-path in our script. See the example below –

The above code, will enter the date Aug-15-2016 in the date of birth field. Using this we can enter the Date in Andriod apps.

 

Using the same way you can manage the Time in Android app.

0 Comment

Leave a Reply