2

I have a paint program written in java with SWT. I am testing with SWTBot. My test case is to draw a picture on the canvas, capture the image of the canvas, and compare to the expected image.

The problem is that I can't find any way to move the mouse using the SWTBot. Apparently it only allows me to click the mouse. I want to

  • move to an x,y location
  • mouse down
  • move to another x,y location
  • mouse up

Any advice?

John Henckel
  • 10,274
  • 3
  • 79
  • 79

1 Answers1

0

I've decided to stop using SWTBot. The functionality is very weak. It is designed for Eclipse apps, so it doesn't really support plain SWT apps very well. Although having direct access to the widgets is somewhat appealing, the requirement of running the test code in the app process is awkward.

I've decided to use Sikuli instead. It has pretty good API for both Java and Python. It seems to have more function and better support than SWTBot.

John Henckel
  • 10,274
  • 3
  • 79
  • 79