I am trying to get a rectangle's background color. I tried to find a way but i couldnt. Isnt there a method makes all this easy? Any help would be appriciated
This worked for me
Rectangle rectangle = lookup("#rectangleId").queryAll().iterator().next();
Paint color = rect.getFill();
assertThat(color,is(color2));