assertj / assertj-swing

Fluent assertions for Swing apps
Other
108 stars 52 forks source link

BasicRobot.click doesn't do enough sanity check and has no timeout before trying to click component #177

Closed timmikk closed 4 years ago

timmikk commented 8 years ago

I'm currently testing software that sometimes still loads and rearranges the screen components after they are set visible. This causes my test to fails some times as in test the BasicRobot tries to click a component that has negative width. What I would like to have is a some kind of sanity check in BasicRobot's click functionality that checks that the component is visible and has some sensible size. Also there should be timeout so that the clicking doesn't fail immediately. This way test could be much more robust even in applications that don't behave optimally.

croesch commented 8 years ago

Could you provide a code snippet of the test code? ComponentDriver does already check whether components are showing, does that help you? So instead of using robot's click method, how about using the click method of the component's fixtuer?

croesch commented 4 years ago

No feedback :-/