I am writing Python Appium code. The code needs to press the HOME button. Right now I have
driver.press_keycode(3)
where 3 is mapped to KEYCODE_HOME according to keycode mapping.
Is there a way that I can refer KEYCODE_HOME in my code so that my code is more readable?
I could have done the following: adding a comment
# HOME Key is 3
driver.press_keycode(3)
or assigning a variable
home_keycode=3
driver.press_keycode(home_keycode)
But I'd more like to see something like
driver.press_keycode(AppiumKey.HOME)
Does such a thing exist?
Thank you