10-30-2015, 08:06 PM
Hello All,
I'm trying to use a general function in my function library to click links. I used variables to define property values. The values for the link properties are coming from the same row as my Teststeps in the Excel file from columns IP1 and IP2. However, when the clickLink function is called the second time it's still using the previous values ie. not pulling values from current Teststep row.
Some columns I could use as identifiers are TSID, Keywords, IP1, IP2
I would really appreciate any help fixing this!
Function Library Code:
Main Code Call from Select/Case:
Thanks in advance,
Scott K.
I'm trying to use a general function in my function library to click links. I used variables to define property values. The values for the link properties are coming from the same row as my Teststeps in the Excel file from columns IP1 and IP2. However, when the clickLink function is called the second time it's still using the previous values ie. not pulling values from current Teststep row.
Some columns I could use as identifiers are TSID, Keywords, IP1, IP2
I would really appreciate any help fixing this!
Function Library Code:
Code:
Function clickLink(dData, dData2)
dData=datatable.Value("IP1","dTeststeps")
dData2=datatable.Value("IP2","dTeststeps")
Browser("micclass:=Browser").Page("micclass:=Page").Link("name:="&dData,"html tag:=A", "text:="&dData2).Click
End Function
Main Code Call from Select/Case:
Code:
Case "clickLink"
dData=datatable.Value("IP1","dTeststeps")
dData2=datatable.Value("IP2","dTeststeps")
Call clickLink(dData, dData2)
Thanks in advance,
Scott K.