You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently (swinglibrary 1.9.7), finding a label is possible using only it's index or name. But usually SwingUI developers tend to forget or not give any names to the most of the components for e.g. buttons, labels etc. So wouldn't be nice to add an ability to look for a label using it's text similar to the way we find buttons? This will help with the keywords Label Should Exist, Label Should Not Exist etc. Using text is more reliable than using index.
Changing LabelOperatorFactory.java from public LabelOperator createOperatorByName(String name) { return new LabelOperator((ContainerOperator) Context.getContext(), new ByNameComponentChooser(name)); } }
to
public LabelOperator createOperatorByName(String name) { return new LabelOperator((ContainerOperator) Context.getContext(), new ByNameOrTextComponentChooser(name)); } }
will do the trick. If my request makes any sense to you people, let me know I will work on it.
The text was updated successfully, but these errors were encountered:
Sounds like a very good enhancement and I don't see any problems that could arise by doing this change.
Are you still interested, @badari412 in providing a pull-request?
Currently (swinglibrary 1.9.7), finding a label is possible using only it's index or name. But usually SwingUI developers tend to forget or not give any names to the most of the components for e.g. buttons, labels etc. So wouldn't be nice to add an ability to look for a label using it's text similar to the way we find buttons? This will help with the keywords Label Should Exist, Label Should Not Exist etc. Using text is more reliable than using index.
Changing LabelOperatorFactory.java from
public LabelOperator createOperatorByName(String name) { return new LabelOperator((ContainerOperator) Context.getContext(), new ByNameComponentChooser(name)); } }
to
public LabelOperator createOperatorByName(String name) { return new LabelOperator((ContainerOperator) Context.getContext(), new ByNameOrTextComponentChooser(name)); } }
will do the trick. If my request makes any sense to you people, let me know I will work on it.
The text was updated successfully, but these errors were encountered: