Files
appointment_tool/commandor.py
T
2022-02-18 22:43:35 +01:00

31 lines
655 B
Python

import subprocess
PACKAGE_NAME = "com.lpa.appointement"
ACTIVITY_NAME = "MainActivity"
class Commandor:
def __init__(self):
pass
def reload_page(self):
# specifying an explicit component name
self.clear_app_data()
subprocess.call("adb shell am start -n {}/.{}".format(PACKAGE_NAME, ACTIVITY_NAME), shell=True)
pass
def clear_app_data(self):
subprocess.call("adb shell pm clear {}".format(PACKAGE_NAME), shell=True)
def send_telephone_number(self):
pass
def send_otp(self):
pass
if __name__ == '__main__':
commandor = Commandor()
commandor.reload_page()