0
votes

I need to document the visual differences between two different versions of a Java program. This involves clicking on an element in the old version, then clicking on the same element in the new version, and taking a screen shot for every instance in which the two display different information and creating a bug report.

Is there a tool that can automate this?

Here's what I've tried so far, but I'm open to other ideas:

I put both Java programs side-by-side and tried using AutoHotkey to duplicate my mouse clicks 960 pixels to the right, but I had some wonky behavior, and even ignoring the wonky behavior I found out that it doesn't work anyway.

I also tried using a Java Robot so the new version of the app would duplicate any mouse clicks 960 pixels to the right, but even the Robot was unable to click in the other Java window. (Note: the Robot was able to click on the Windows desktop and on other programs, just not on the other Java program.)

1

1 Answers

0
votes

It seems that a Java application cannot click in another Java application for some reason. I ended up having to do all the clicking manually. If I were to do it again in the future, I think my best bet would be to have the implement the feature ahead of time. Then I'd have to the two versions of the app communicate directly with each other.

For example, the first program would record a mouse click macro using the relative mouse coordinates for each click/drag/etc., then send the macro to the second program via a network socket. After that, the second program would replay the macro within its own screen coordinates, then return control back to the first program. Maybe I could abuse the Abbott GUI testing framework.