You can Use Regular Expressions for this. Just go the QTP help & you will find how to use regular ecxpressions.
Login to rate this answer.
see if it is a webtable go to stepgenerator and put mouse on corresponding link and select getcelldata(row,column) of that particular place
and returrn that value to datatable then parameterised to that link
what ever link will come over there it will click
Login to rate this answer.
Browser(B).Page(P).Link("120 orders").click (Runtime this text may change)
here use getcelldata(row,column)
a=Browser(B).Page(P).getcelldata(2,3)
datatable.value("link",1)=a
Browser(B).Page(P).link("a")
Login to rate this answer.
I'd get all the link objects for the page, or object that match a certain criteria. In this case, all your order links match ".*orders", then run a loop to click each of them
For example:
' Set up an object description array for matching links
Set arrObjectDescriptionField = Description.Create()
' Set our link match criteria
arrObjectDescriptionField("html tag").Value = "A"
arrObjectDescriptionField("text").Value = ".*orders"
' Retrieve an array of objects from the browser that match
' the description criteria
Set arrObjectsLinks = Browser("MyBrowserName").Page("MyPageName").WebTable("MyTableName").ChildObjects(arrObjectDescriptionField)
' Count the number of links found that are stored in the array
intObjectCountTotal = arrObjectsLinks.Count
' Run one iteration for each link
For intObjectIterator = 0 to intObjectCountTotal - 1
' Click on the link
arrObjectsLinks(intObjectIterator).Click
' Your verification code should go here, along with code to bring you back to the original web page.
' After you come back from the page you clicked on you will need to
' re-index the array of browser objects, otherwise it will cause a
' runtime error (Unless your links open in a new window)
Set arrObjectsLinks = Browser("MyBrowserName").Page("MyPageName").WebTable("MyTableName").ChildObjects(arrObjectDescriptionField)
Next
Hope that helps
Login to rate this answer.