appium-mac2-driver icon indicating copy to clipboard operation
appium-mac2-driver copied to clipboard

Сan't simulate pressing a shortcut

Open KaterinaNavara opened this issue 1 year ago • 3 comments

I'm trying to simulate pressing the shortcut - command+shift+g in the file save window, but it doesn't work either way. I tried way mentioned in documentation, like this: await browser.executeScript("macos: keys", [{ keys: [{ key: "g", modifierFlags: ((1 << 4) & (1 << 1)) }] } ]) but it doesn't work. Could you help me with it, please?

KaterinaNavara avatar Mar 10 '23 10:03 KaterinaNavara

has you sloved it now?I have same question about simulate combine multi keys

HaoWShi avatar Feb 23 '24 07:02 HaoWShi

Change the expression for modifierFlags to (1 << 4) | (1 << 1)

mykola-mokhnach avatar Feb 23 '24 07:02 mykola-mokhnach

image

HaoWShi avatar Feb 24 '24 02:02 HaoWShi