0

who know how to automate Java Application? I'm currently working with Selenium WebDriver, but it my test I should download pictures and they'r running in Smart Review System, and I don't know how to control it. Do somebody know?

Vitaliy Mckay
  • 163
  • 2
  • 13

2 Answers2

3

You can use image-driven test tool like Sikuli- sikuli.org

Anton Angelov
  • 1,705
  • 13
  • 16
  • and how to switch to Application window? – Vitaliy Mckay Aug 06 '15 at 12:11
  • you can check the official documentation- https://answers.launchpad.net/sikuli/+question/179709 – Anton Angelov Aug 06 '15 at 12:12
  • ok, thx. But I was reading about sikuli and somebody said that he's working slow. Is it true? – Vitaliy Mckay Aug 06 '15 at 12:13
  • I have tried it in the past and it really depends on the parameters on the machine that you are running it. It's slower than most of web automation tools however in some cases you don't other alternatives. If this answered your question, please marked it as answered. Thank you in advance! – Anton Angelov Aug 06 '15 at 12:16
  • By the way, may be you know how to do this? Or I can do it with Sikuli too? http://stackoverflow.com/questions/31853031/webdriver-click-on-java-window – Vitaliy Mckay Aug 06 '15 at 12:21
0

One Solution is to start or stop external Programms with the java ProcessBuilder like:

ProcessBuilder command = new ProcessBuilder("cmd", "/c",
                        <Path to Application>);
command.start();

This will start the wanted apllication through the command-shell.

MrT
  • 594
  • 2
  • 17
  • if there is no device for other programms to interact or this programm is not within the `WebDriver`. it will be hard to give the programm instruction. to end it you can use the `killtask`-command with the `ProcessBuilder`. Otherwise if it is a full screen program maybe the `java.awt.Robot;` class helps you with doing some hardcoded mouseclicks. – MrT Aug 06 '15 at 12:14
  • no, I think it's not a good idea, I'll try to find another way, but thanks – Vitaliy Mckay Aug 06 '15 at 12:15