How can I press the physical menu button in android?
@Appium_Master @rgonalo @jonahss Could you please help in?
How can I press the physical menu button in android?
@Appium_Master @rgonalo @jonahss Could you please help in?
You can do it with key events. I think the name of the menu button is KEYCODE_MENU (82).
In java it would be like:
driver.sendKeyEvent(AndroidKeyCode.KEYCODE_MENU);
driver.sendKeyEvent(AndroidKeyCode.
Type this and once you click dot you will get all options which you can use it like menu, back, home…etc
Cool !
Thank you Guys !
i have tried all of these but none of them worked for me
((PressesKeyCode) driver).pressKeyCode(AndroidKeyCode.MENU); ((PressesKeyCode) driver).pressKeyCode(AndroidKeyCode.MENU, AndroidKeyMetastate.META_SHIFT_ON);
AppiumDriver.sendKeyEvent(AndroidKeyCode.MENU);
HashMap swipeObject = new HashMap(); swipeObject.put(“keycode”, 82);
((JavascriptExecutor ) driver).executeScript(“mobile: keyevent”, swipeObject);