Search code examples
sikuli

How to press PageDown button in Sikuli?


In my project I need to press Page Down button using Sikuli. Currently, I am using below line of code but it does not work:

screen.type(Key.PAGE_DOWN);

Solution

  • What happens if you push this button manually? Does it work? Try to do it like this:

    screen.keyDown(Key.PAGE_DOWN);
    Thread.sleep(500);
    screen.keyUp();
    

    Also make sure that this window is focused