1

I'm using Marthon to run tests on a Java Swing application. I build the base tests by recording, then just make small modifications to the resulting Ruby tests to tweak it to fit what I need. I've run into an interesting problem where comboboxes selections do not work. For example, it'll record...

select("Value", "0.25")

...for the Value combobox, which has a valid option of 0.25 in it. However, during playback, the script pauses execution at that point. If I manually click on the combobox (just to drop it down, not actually selecting anything), then the script will select the right number and continue on.

The problem exists for ALL (so far tested) comboboxes in my application, but none of the other control types. Is there a way to select a value in the combobox that works? I don't mind tweaking the recorded script, I just want to not have to manually click on all my comboboxes each time they're in the script!

Ross Allen
  • 43,772
  • 14
  • 97
  • 95
Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92

2 Answers2

1

Have a look at the object map files for the window and change the recognition properties. That should make this consistent.

The _2 basically means that Marathon is unable to find unique properties to identify the components.

Dakshinamurthy Karra
  • 5,353
  • 1
  • 17
  • 28
  • Helpful, in that I didn't know about the map, but I still can't solve the problem. It has appropriate field names in the map, but doesn't seem to recognize them in the script. It seems to go off of text in the boxes nearby rather than the component names? – Brian Knoblauch Jan 18 '12 at 15:43
  • 1
    While testing we found a problem w.r.t combo boxes. Basically, the index in container value changes for a combo box depending on the popup list is displayed or not. Since, at recording time the list is open and playing time the list is not displayed - Marathon is unable to find the component while playing. One solution is to use another recognition property for identifying the combo box. Do you know that the first param to select can be a property list using which you can select the component. Please look at the user guide for details. Hope this helps. – Dakshinamurthy Karra Jan 22 '12 at 06:55
0

Well, I figured it out already... Apparently the recorder just does a poor job at figuring out the correct label for comboboxes. I was able to get some to work by removing the "_2" or whatever at the end. Others, it took incrementing that number. So, apparently the way the recorder sees the screen layout is different from what the player sees.

edit

The newest version of Marathon appears to have fixed whatever was ailing it before. I'm now unable to duplicate the problem.

Brian Knoblauch
  • 20,639
  • 15
  • 57
  • 92