Hello.
I just started using this great library (actually using version 1.6.0).
I was able to detect windows, (main) menus, dialogs, etc... but I have a conceptual doubt which won't let me progressing on testing our application:
After selecting, for example, a dialog, When I use the keyword "List components in context":
${list_components}= List components in context
I get an UNICODE list of all the components visible in the context as expected. What I did not work out yet is how to select or reference a subcomponent (extracted from that UNICODE string) to be able to retrieve information from it.
For example:
After successfully selecting a dialog and list the components on its context, I get something like:
TRACE Return: u'[0 javax.swing.JDialog null: dialog0, 1 javax.swing.JRootPane 0: null, 2 javax.swing.JPanel 0: null.glassPane, 2 javax.swing.JLayeredPane 0: null.layeredPane, 3 javax.swing.JPanel 1: null.contentPane, 4 javax.swing.JOptionPane null: null, 5 javax.swing.JPanel 2: OptionPane.messageArea, 6 javax.swing.JPanel 3: OptionPane.realBody, 7 javax.swing.JPanel 4: OptionPane.separator, 7 javax.swing.JPanel 5: OptionPane.body, 8 javax.swing.JLabel 0: OptionPane.label, 8 javax.swing.JLabel 1: OptionPane.label, 8 javax.swing.JLabel 2: OptionPane.label, 6 javax.swing.JLabel 3: OptionPane.iconLabel, 5 javax.swing.JSeparator null: OptionPane.separator, 5 javax.swing.Box$Filler null: null, 5 javax.swing.JPanel 6: OptionPane.buttonArea, 6 javax.swing.JButton 0: OptionPane.button]'
As it can be observed, there are 3 JLabel classes (with one text field each):
...
8 javax.swing.JLabel 0: OptionPane.label,
8 javax.swing.JLabel 1: OptionPane.label,
8 javax.swing.JLabel 2: OptionPane.label,
...
Next I would like to read the text field of the second JLabel:
8 javax.swing.JLabel 1: OptionPane.label
I could not find any suitable way of performing these steps.
Could you please guide me on the way of correctly referencing this kind of classes?
Your help will be much appreciated,
Thanks!