How can uniquely identify ....
User DAVID MARSH (DAVID.MARSH@thales-cs.com.nospam) posted:
How does the user tell which is which?
The following could be absolute garbage coz I'm only on my 1st cup of coffee
and haven't touched robot for over a month (and never had this problem), but
I would start along these lines.
Is there a label, are they different sizes?
If you can get the property that marks them as different from each other
then you could work from that.
Suppose they had different background colours after getting the recognition
method from SQAGetChildren look at the property you know to be unique to
assign the recognition method to a variable, so then use that variable to
drive SQAGetProperty, in pseudo code something like.
Result = SQAGetProperty(sChild1,"Background",vColor)
If Result = 0 Then
If vColor = "Blue" Then
sBlueBox = sChild1
sPinkBox = Schild2
sBlueBox = sChild2
sPinkBox = Schild1
'failed to get property
So below this any code could be written with the assurance that you would be
looking at the right box.
Result = SQAGetProperty(sBlueBox,"Text",vText)
Re: How can uniquely identify ....
User (email@example.com) posted:
Are the "text boxes" in an HTML document (displayed in Internet Explorer)?
All objects captured by Robot have an ObjectIndex property. If you can
verify that the ObjectIndex for each box corresponds to their location in
the document (e.g., starting at top-left of document, the FIRST box has
ObjectIndex=1), then you can use "ObjectIndex=<#>" as the second part of the
Note that ObjectIndex is subject to change. Another possibility is to use
"blind navigation" technique combined with Copy/Paste. If you can find an
"anchor point" on the page that you can reliably TAB to the first box (and
know where the cursor is), you can then Copy the contents of the box to
the Windows Clipboard to test its contents.