Hello everyone,
I have just started with RobotFramework and need a little help with addressing the correct checkbox.
I am testing a Java-based HMI, so I have to use the remote swing library.
Below you can see an example of the structure of the problem. There are several checkboxes. Unfortunately, these consistently have the name chkValue, lblTitle is different.
Level: 0 Component: javax.swing.JPanel Index: 0 Name: pnlContent
Level: 1 Component: javax.swing.JScrollPane Index: 0 Name: jScrollPane1
Level: 2 Component: javax.swing.JViewport Index: 0 Name: null
Level: 3 Component: AfGroupCtrlAutoPanel Index: 1 Name: pnlContent
Level: 4 Component: AfGroupCtrlAutoPanel Index: 2 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 0 Name: lblTitle
Level: 5 Component: javax.swing.JPanel Index: 3 Name: pnlContent
Level: 6 Component: com.lib.ui.beans.CheckBox Index: 0 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 1 Name: lblTitle_left
Level: 4 Component: AfGroupCtrlAutoPanel Index: 4 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 2 Name: lblTitle
Level: 5 Component: javax.swing.JPanel Index: 5 Name: pnlContent
Level: 6 Component: com.lib.ui.beans.CheckBox Index: 1 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 3 Name: lblTitle_left
Level: 4 Component: AfGroupCtrlAutoPanel Index: 6 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 4 Name: lblTitle
Level: 5 Component: javax.swing.JPanel Index: 7 Name: pnlContent
Level: 6 Component: com.lib.ui.beans.CheckBox Index: 2 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 5 Name: lblTitle_left
Level: 4 Component: AfGroupCtrlAutoPanel Index: 8 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 6 Name: lblTitle
Level: 5 Component: javax.swing.JPanel Index: 9 Name: pnlContent
Level: 6 Component: com.lib.ui.beans.CheckBox Index: 3 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 7 Name: lblTitle_left
Level: 4 Component: AfGroupCtrlAutoPanel Index: 10 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 8 Name: lblTitle
Level: 5 Component: javax.swing.JPanel Index: 11 Name: pnlContent
Level: 6 Component: com.lib.ui.beans.CheckBox Index: 4 Name: chkValue
Level: 5 Component: com.lib.ui.beans.Label Index: 9 Name: lblTitle_left
With the following code fragment, I can check the first checkbox.
Select Context pnlContent Check Check Box chkValue
I do not want to limit the selection of the checkbox to the first one.
Could someone give me a hint as to the best way to solve this issue?
Thank you very much