03-25-2011, 02:45 AM
I have to write code to click on Link which contains "*" at end of text, example - TestLink *
I have populated these link names in the Datatable. Now to click on the link, I have the following code
'*** get link name
'**** check the link Exist
This code works fine for strLinkName= Test Link ,but fails when name has "*" at the end , like strLinkName= Test Link *
Please suggest where I missed something, I have few links in my test app, which needs to clicked to perform next function.
Thanks
Neel
I have populated these link names in the Datatable. Now to click on the link, I have the following code
'*** get link name
Code:
strLinkName = datatable.value("Global","LinkName")
'**** check the link Exist
Code:
If Browser("XYZ").Page("XYZ").Link("text:=" & strLinkName, "html tag:=A").Exist Then
Browser("XYZ").Page("XYZ").Link("text:=" & strLinkName, "html tag:=A").Click
Else
msgbox "Link Not Found"
End if
This code works fine for strLinkName= Test Link ,but fails when name has "*" at the end , like strLinkName= Test Link *
Please suggest where I missed something, I have few links in my test app, which needs to clicked to perform next function.
Thanks
Neel