Open MarcMazas opened 4 days ago
There is a workaround: you can disable highlighting by using a custom Tester object :
Tester tester = new Tester() {
@Override
protected void highlightCurrentComponent() {
// do nothing
}
@Override
protected void unhighlightCurrentComponent() {
// do nothing
}
};
TestingUtils.assertSuccessfulReplay(tester, new File("test-specifications/testFlipper.stt"));
OK. I see that changing the border (adding an outside border of 1 thickness in createCompoundBorder) causes the problem. I tried repacking the frame and it seems working.
if (currentComponent instanceof JComponent) {
currentComponentBorder = ((JComponent) currentComponent).getBorder();
try {
((JComponent) currentComponent).setBorder( //
BorderFactory.createCompoundBorder( //
BorderFactory.createLineBorder(HIGHLIGHT_FOREGROUND, 1), //
currentComponentBorder) //
);
} catch (Throwable ignore) {
}
JFrame frame = (JFrame) SwingUtilities.getRoot(currentComponent);
frame.pack();
}
Hi When I want to record a test case with TestEditor on my application, the first time I click in the app window, this one changes : textFields see their withs reduced near zero, which prevents reading their texts. See attached captures: I am missing something ? If not, is there a workaround, or could you tell me in which classes this behavior can be investigated? TIA