Hi, I need to change the system date time of an android device. Is there any way to set the system date time? or do I have to click and type and do those manual movements?
As an activity AFAIK no. Your options right now are:
- Automate UI and change date
- If you have access to ADB you can issue an adb command to change the system time (this StackOverflow answer might help)
- If you don’t have access to ADB but can directly send HTTP requests to the Appium instance, you can use its capabilities to execute that command but in this case you need the current sessionId which you can get hold of but it’s hacky (these articles might help, if you get the session ID, How To Execute Shell Commands On The Remote Device - Appium and Execute Mobile Command - Appium)
I know that this is not good news but hope is still useful!
Hi Cristian,
Thanks for the advices. I tried to reach my device via cmd to change the system date and time. but I couldn’t achieve root control. I didn’t want to force and brick the phone. I will try the last one
Thanks again