User Posey, Bruce ( posted:

Frequently when recording interactions with applications and objects, it is
desirable to use the text value of the object such as in a drop down window,
vs. the value or index. Even though Robot may not record the text value,
you can often programmatically change the command to do your bidding.

Such as:
Here is what Robot recorded:
Window SetContext, "DropDownDW", "Activate=0"
GenericObject Click, "Type=DWColumn;Name=baabbrvtn",

notice the object recognition method, specifically the parameters section,
I didn't want to use the Value=29 but instead I wanted to use the text that
was shown in the dropdown box. So with a little experimentation, I came up
with a substitute of:

Window SetContext, "DropDownDW", "Activate=0"
GenericObject Click, "Type=DWColumn;Name=baabbrvtn", "Text=Conoco Inc."

This worked great. Notice that I changed ColName=baid;Value=29 to
Text=Conoco Inc.

Now that I know that this worked I could do the following:

Window SetContext, "DropDownDW", "Activate=0"
GenericObject Click, "Type=DWColumn;Name=baabbrvtn",

where my_str_variable was initialized from an external data file.

So the point of the story is for the lesser experienced folks on the list
(I'm sure the guru's already know this stuff):
Don't be afraid to experiment with the object recognition methods. Just
because robot won't record what you want to use doesn't mean it can't be

Hope this helps somebody out.

Bruce Posey
Test Automation Specialist
Premcor - 314-854-9836
************************************************** ********************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
************************************************** ********************