0

In one of my automation tests, I want to update device data and time. I am using appium driver to execute the tests.

user_8275
  • 233
  • 4
  • 15

1 Answers1

0

You should be able to do it by running adb command with Appium.

Adb command:

adb shell 'date 060910002016.00'

First, try this command in terminal to see if your device allows it for you. Should be fine with emulators.

Appium provides API to run adb command, so depending on your client library it should look similar to this (js example)

await driver.execute('mobile: shell',  {
    'command': 'date',
    'args': ['060910002016.00']
});
dmle
  • 3,498
  • 1
  • 14
  • 22