This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When I use only constructors of JFrameOperator, NBFrameOperator, and TopComponentOperator, there is not any posibility to search component for exact name and/or use may ComponentChooser So, please, add at least constructors with ComponentOperator as argument. This problem forbid me to find "Versioning" frame. because sometimes there could be 2 frames with "Versioning" substring in its caption.
This issue supposed to be failed against jellytools module, since there is nothing could be done in Jemmy about it.
I understand that you need constructors with ComponentChooser as a parameter to be able to find JFrame, NbFrame or TopComponent by some criteria such as full title, right? It's already implemented in Jemmy (i.e. for JFrame), it sounds reasonable to make the same for Jelly. What I do not understand is why do you need constructors with ComponentOperator as an argument. What this argument means?
There IS a possibility to use exact matching criteria while searching a component: Operator.DefaultStringComparator comparator = new Operator.DefaultStringComparator(true, true); Operator.StringComparator oldComparator = Operator.getDefaultStringComparator(); Operator.setDefaultStringComparator(comparator); NbFrameOperator frameOper = new NbFrameOperator(title); Operator.setDefaultStringComparator(oldComparator); You can also use ComponentChooser in operators static methods, e.g.: JFrameOperator.waitJFrame(myChooser); Do above constructions solve all your problems? I think so, that's why I set this issues as invalid.
In case you need to subclass NbFrameOperator and you need exact match in constructor, comparator has to be set in static method: public class Test1 extends NbFrameOperator { public Test1() { super(getTitleToFind()); // restore default comparator setDefaultStringComparator(oldComparator); } private static StringComparator oldComparator; private static final String title = "Versioning"; private static String getTitleToFind() { oldComparator = getDefaultStringComparator(); DefaultStringComparator comparator = new DefaultStringComparator(true, true); setDefaultStringComparator(comparator); return title; } } Does anyone know better solution?