-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JComboBoxFixture.selectItem() does not set focus on ComboBox #271
Comments
Any update on this? |
We are still using a workaround... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I get failing tests even though my code is fine; the test is failing because
JComboBoxFixture.selectItem()
does not set focus on the ComboBox (as a user action would do).(Background info: I am relying on the focus of ComboBoxes (or any of their subcomponents) as a trick to detect whether
ActionPerformed
orItemStateChanged
events are "real" ones (resulting from user actions) or "superfluous" ones (that ComboBoxes tend to throw on other inappropriate occasions.)I verified this by debug output, but also when (visually) watching the test runnning, I notice that other UI elements (e.g. buttons) get a painted focus, while the combobox does not.
My colleague @Gleethos had a look at
JComboBoxDriver
andJComboBoxSetSelectedIndexTask
, and we think that there should be some code setting focus (like an analogon toJButton.doClick()
, which does set the focus for buttons).P.S. If this is welcome, we could try to add/fix it and create a pull-request...?
The text was updated successfully, but these errors were encountered: