WebDriver click on “Java window”

2019-09-07 08:50发布

I'm saving files from the Application, and have this save window:


enter image description here


Here to press "OK" button I used next method:

Robot robot = new Robot();
    robot.keyPress(KeyEvent.VK_ENTER);
    robot.keyRelease(KeyEvent.VK_ENTER);

After this window Java Loading application to open it:enter image description here

And After this I have this window and previous code doesn't work here, I can't press Enter:enter image description here Who know how to Click on "Run" on the last screenshot?

1条回答
时光不老,我们不散
2楼-- · 2019-09-07 09:55

I think again it will be a lot easier to use Sikuli for the job. You can do it with the simplest hello world example- http://doc.sikuli.org/tutorials/helloworld/helloworld-win.html

查看更多
登录 后发表回答