WidgetInfo button_1 = getJavaInfoByName("button_1");
WidgetInfo button_2 = getJavaInfoByName("button_2");
//
List<WidgetHandle> handles = panel.getWidgetHandles();
assertThat(handles).hasSize(2);
WidgetHandle handle_1 = handles.get(0);
WidgetHandle handle_2 = handles.get(1);
Rectangle bounds_1 = handle_1.getBounds();
Rectangle bounds_2 = handle_2.getBounds();
{
assertSame(button_1, handle_1.getWidget());
assertThat(bounds_1.x).isEqualTo(0);
assertThat(bounds_1.y).isEqualTo(0);
assertThat(bounds_1.width).isGreaterThan(40).isLessThan(60);
assertThat(bounds_1.height).isGreaterThan(20);
}
{
assertSame(button_2, handle_2.getWidget());
assertThat(bounds_2.x).isEqualTo(bounds_1.right());
assertThat(bounds_2.y).isEqualTo(0);
assertThat(bounds_2.width).isGreaterThan(70).isLessThan(90);
assertThat(bounds_2.height).isEqualTo(bounds_1.height);
}