| || |
The application that i am currently working on is a web application. It has nothing more than links all around.
Now this is how it works,
firstly from a given page of actions (like add to inventory, remove from inventory, etc)i select a link that takes me to another page that has links to all the order numbers.
Now in this page i select a particular order number (which is also a link), which takes me to another page which have items of the order number.
Now these items are also links which has to be then added on to the inventory by clicking them.
it looks like these
Now my questions,
1.Is there a way to count the the orders in the page and then select a particular order or use something like "get item" method to manipulate which order i am gonna select (something like the one we have in winlist method).
2. If not what are the other options i have since the order number are unique for each login i cannot go ahead and do a record and play as some of them might have 100's of orders and some none at all.
Anyhelp would be appreciated.
Re: link object
Try ChildObjects method. For example:
'Get all links
Set Desc = Description.Create
Desc("micclass").Value = "Link"
Set Links = Browser("MyBrowser").Page("MyPage").ChildObjects(desc)
'Get the number of links
NumOfLinks = Links.Count
'Send each link name to report
For i = 0 to NumOfLinks-1
LinkName = Links(i).GetROProperty("name")
Reporter.ReportEvent micDone, "Link number " & i , "Link name: " & LinkName
'Click the 4th link
Re: link object
thanks a lot dima,
it works but i have some more question regarding the way a particular number is selected. but will work on this one before putting forth anything.