I'm trying to do something, I thought, was simple.
I'm grabbing some link titles from the DataTable and I'm trying to use it as a Link().Click
So I navigate all the static pages
Browser("micClass:=Browser").Page("micClass:=Page").Link("micClass:=Level1").Click
Browser("micClass:=Browser").Page("micClass:=Page").Link("micClass:=Level2").Click
'Grab the next pages I want to iterate through
lnk = (DataTable ("iterLink", dtGlobalSheet))
Browser("micClass:=Browser").Page("micClass:=Page").Link(lnk).Click 'should be Link("name:=[lnk]").Click Or something like that
Browser("micClass:=Browser").Page("micClass:=Page").Sync
'Do some reusable actions that test the page
'Finish and go to the next page to test
------
I'm doing it this way because all of the tests are the same, but the page that is to be tested changes on a daily bases and someone else selects what gets tested.
They don't use QTP and I figured a script that reads the Excel sheet would be easiest. So I want it to be as flexible as possible. I'm using the title of the pages because they are unique and I want to use the .Click to capture the active screen (the Navigate method doesn't do that for me) and the url (href) changes from time-to-time.
I hope it makes sense what I'm doing. What do I need to do to make this work? Is there a better method?
Thanks in advance for any help.
PS: I did try to use Description.Create() but it doesn't work correctly. the result shows that it can identify it (put a square around the link), but it cannot use the object (click it).