The only thing I see here is that it wont even look at "Text=Next" it will jump to "ObjectIndex=1". if you want to click on Next then you will have to remove the objectindex (try not to use objectindex unless you have to)
What do you mean on the page? I guess the example I am stating is trying to cover for a case where a Command ID might change unexpectedly. So if you check for ID and TEXT you'll always work. I guess what you are saying is it doesn't work this way and you have to write two lines of code.
When I say "page", i'm refering to the application under test. if you are expecting the command ID to change then avoid using object index. try not to use object index, expecially if you have the option to use the Text or Name property.
Look at help (SQABasic Reference\Index\"recMethod"\multiple values in).
Multiple recMethod are used for uniquely identify the target object. I tried it with PushButton, but it didn't work. I provided 2 identifiers in recMethod:
Window SetContext, "Caption=New", ""
PushButton Click, "Text=OK;ID=1"
So I think that it is impossible to use recMethod as you want ... "if one identifier fails than Robot should try second one".
BTW: gixer is right - if you can use Object Text or Name property you should always use it because it is the best way for Robot.
The best object identifier in general is object handle because it is unique in entire OS, but as Robot use recMethod it's little bit hard to use it and on the other point handle exists only for period of object existence.
If you want to give somebody a fish, you'll do better if you teach him how to catch it.
That's a bummer. Lame design on their part. As usual there is a missing flow of traffic when dealing with each of the different functions in Robot. Thanks for trying though. Usually I rely on ID's but it's nice to have a backup if one changes.
Yet another feature request for this development team.