09-02-2010, 10:22 PM
It's been my experience that the only reliable way to get DP to work with multiple criteria is to use a Description object array.
This should get you started. You can make it dynamic by passing in text and tag parameters. If there is more than one you can add other values to the array such as html id. I took this code a made a click function that will take my ID or Text parameter and search for any clickable object (link, button, image, etc) by changing the micclass if my linkarray object length is "0". You can also use regular expressions.
Code:
dim objdescription, myobj, linkarray
set objdescription = Description.Create()
objdescription("text").value = "Click Me"
objdescription("html tag").value = "a"
objdescription("html tag").RegularExpression = false
objdescription("micclass").value = "Link"
Set myobj = Browser("Browser").Page("Page")
myobj.sync
set linkarray = myobj.ChildObjects(objdescription)
linkarray(0).Click
This should get you started. You can make it dynamic by passing in text and tag parameters. If there is more than one you can add other values to the array such as html id. I took this code a made a click function that will take my ID or Text parameter and search for any clickable object (link, button, image, etc) by changing the micclass if my linkarray object length is "0". You can also use regular expressions.