Open Nfactor26 opened 7 years ago
Hi, @Nfactor26! I have the same problem with ComboBox in SwingSet2 from JDK demo samples. Did you solve it?
No. I spent several hours but could not get it working . Since i had the dropdown control and option control already looked up , i retrieved their bounding box and then used mouse simulation to actually move the mouse and perform click on dropdown control followed by option to select.
Have you tried calling the "click" action on the newly selected item of the combo box? (using the DoAccessibleActions
method).
@rpaquay yes. I tried all possible ways to add selection item to ComboBox. I used to
About "click". It works similarly to AddAccessibleSelectionFromContext() method, after DoAccessibleActions() list item would be selected but action "click" doesn't occur
Does anyone know what is the solution?
Events_PropertySelectionChange is being triggered whenever we try to change the selection in the combo box,but is there any specific event that will capture once the value is changed in the combo box. Anyone have a solution,Please let me know how to capture the data every time value is changed in the combo box.
For selected index on combobox please try to use Functions.AddAccessibleSelectionFromContext()
void AddAccessibleSelectionFromContext(int vmid, JavaObjectHandle asel, int i)
int i -> means index of value in combobox.
After calling AddAccessibleSelectionFromContext(int vmid, JavaObjectHandle asel, int i) you should simulate key stroke AccessibleKeyCode.ACCESSIBLE_VK_ENTER. It works for me.
I am trying to automate UI of "FileChooserDemo.jar" application distributed with jdk-8u121-windows-x64-demos. There is a button on the UI "Show FileChooser". There is a drop down labelled "Look and Feel" on this application. Possible values are "Metal","Nimbus","Windows",etc. I am selecting the "Windows" options using following code :
Expected behavior : Theme of the application should change to selected value in drop down like it happens when manually making the selection using mouse.
Current behavior : Theme of the application doesn't change. Also, changing the value in drop down now manually using mouse has no effect on UI.
Regards, Nish26