Re: Using DataTables for DP
Try this:
Dim strLink
strLink = DataTable(“iterLink”, dtGlobalSheet)
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Link(“url:=”&strLink).Click
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Sync
Re: Using DataTables for DP
[quote=Anshoo_Arora;26891]Try this:
Dim strLink
strLink = DataTable(“iterLink”, dtGlobalSheet)
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Link(“url:=”&oLink).Click
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Sync[/quote]Thanks for the prompt reply Anshoo.
It still doesn't recognize the link name. I get a run error "cannot identify object..." and then it highlights the link.
Dim strLink
strLink = (DataTable(“iterLink”, dtGlobalSheet))
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Link(“name:=”&strLink).Click
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Sync
Was what I tried.
I changed the .Link(“name:=”&strLink).Click because I this is what you meant. Is &o something special? it gets highlighted as if it's in quotes. I changed it to &o as well but that didn't do anything.
Any other suggestions?
Re: Using DataTables for DP
[COLOR="DimGray"]Your concept is correct. I think that you have multiple links on the same page with the same name. Try using the index property.
Like this:
Dim strLink
strLink = DataTable(“iterLink”, dtGlobalSheet)
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Link(“name:=”&strLink, "index:=0").Click
Browser(“micClass:=Browser”).Page(“micClass:=Page”).Sync[/COLOR]
Wait.. the above code might not work. Looking at the error message, I think you are not able to uniquely identify the link object. I would suggest you to use "url", but I am not sure how objects are defined in your application. If you could message me the object properties of one of your links, we might be able to work out a solution.
Re: Using DataTables for DP
[quote=Anshoo_Arora;26895][COLOR=dimgray]Your concept is correct. I think that you have multiple links on the same page with the same name. Try using the index property.[/COLOR]
[COLOR=dimgray]Like this:[/COLOR]
[COLOR=dimgray]Dim strLink[/COLOR]
[COLOR=dimgray]strLink = DataTable(“iterLink”, dtGlobalSheet)[/COLOR]
[COLOR=dimgray]Browser(“micClass:=Browser”).Page(“micClass:=Page”).Link(“name:=”&strLink, "index:=0").Click[/COLOR]
[COLOR=dimgray]Browser(“micClass:=Browser”).Page(“micClass:=Page”).Sync[/COLOR]
Wait.. the above code might not work. Looking at the error message, I think you are not able to uniquely identify the link object. I would suggest you to use "url", but I am not sure how objects are defined in your application. If you could message me the object properties of one of your links, we might be able to work out a solution.[/quote]Your right, the first two links are too similar that it won't uniquely identify it. No other link has the problem
The links look like:
Demo - Link 1
Demo - HotLink 2
Fire 3
Dog 4
Rabbit 5
Something to that extent.
I was about to send you my Object Spy file for a couple of links when I decide to take a step back and directly test the value. Now that I realize the problem I need to change my method. There's nothing else that is unique enough to use the method I want. I need to figure something else out.
Thank you so much.
Re: Using DataTables for DP
Why don't you use their "url" property instead of name? You can simply copy their urls and replace them with the names you have entered in the DataTable.