AppTestStudio icon indicating copy to clipboard operation
AppTestStudio copied to clipboard

Keyboard event doesn't work

Open Ace-Kyle opened this issue 1 year ago • 1 comments

It is so strange that: I use keyboard event (action) with "F5" key.

  • When click "Test" button (design mode)-> it worked normally.
  • But when running (run mode) -> it doesn't work as expected. I watch debug screen of AppTest Studio and saw that that event was executed (but no effect) and it show: First use Compiling keyboard script. #bug

Ace-Kyle avatar Dec 21 '24 15:12 Ace-Kyle

Hi Ace-Kyle,

Here's some things to try.

Keyboard input requires the target app to be the active foreground window. Not just in front, but focused and activated.

A keypress consists of: Key Down, wait, Key Up. Some apps need a longer wait to register a key down. Run multiple tests to find a consistent keypress.

There's a setting on the project to try to activate the target app. It's not instant, it does try to wait until activated but there's a timeout.

Try setting the target app to run in window mode, you might have to adjust existing pixel event nodes.

Thanks,

Daniel

DanielHarrod avatar Dec 21 '24 18:12 DanielHarrod