Is it possible to get device current date and time in APPIUM?


#1

@jonahss @Appium_Master @bhaskar @rgonalo @Hassan_Radi

Thanks In Advance :yum:


#2

I would try the following:
iOS: idevicesyslog http://stackoverflow.com/questions/7277804/ios-iphone-ipad-ipodtouch-view-real-time-console-log-terminal

Android: adb logcat -v time

With these being both command line programs, you can Grep out the time stamp and format how you wish.

Hope this helps


#3

We could add this data somewhere if you like. You could make a feature request in a github issue on the main appium project.

If you want to work on a pull request for this, we can work with you :smile:


#4

Sure @jonahss, I have made a feature request in a github issue with issue #5893.


#5

Is this feature implemented in Appium?


#6

Hi try these, it works for me

iOS: idevicedate
Android : adb shell date


#7

@sivaprasad you can use:

driver.getDeviceTime()

#8

Hi Telmo_Cardoso,

I need this format like (hh:mm:ss a) please help me with this.

driver.getDeviceTime(String format);–> i used this method but it work as which you give.
can you help me how to pass string in method.