Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Finding Links with Paren's
#10
Solved: 11 Years, 3 Months, 1 Week ago
I did finally figure this out. It is call normalizing a string. Like Ankeh mentioned, I needed to place a \ in front of characters not recognized by QTP when it is in a link etc.

My link namesd change and contain all types of characters, those along with the number keys on the keyboard.

To normalized a string, I used Replace. My function is thus:

Code:
Public Function NormalizeString (OrgStr)

            Dim TempStr
            
            TempStr = Replace(OrgStr, "\", "\\")

            TempStr = Replace(OrgStr, "/", "\/")
            
            TempStr = Replace(TempStr, "*", "\*")
            
            TempStr = Replace(TempStr, "+", "\+")

            TempStr = Replace(TempStr, "(", "\(")

            TempStr = Replace(TempStr, ")", "\)")

             TempStr = Replace(TempStr, "=", "\=")

             TempStr = Replace(TempStr, "&", "\&")

             TempStr = Replace(TempStr, "@", "\@")

             TempStr = Replace(TempStr, "#", "\#")

             TempStr = Replace(TempStr, "_", "\_")

             TempStr = Replace(TempStr, "!", "\!")
            
            NormalizeString = Replace(TempStr, "?", "\?")
            
End Function
Reply


Messages In This Thread
Finding Links with Paren's - by mv8167 - 09-12-2011, 08:54 PM
RE: Finding Links with Paren's - by Ankesh - 09-13-2011, 01:05 PM
RE: Finding Links with Paren's - by mv8167 - 09-13-2011, 08:26 PM
RE: Finding Links with Paren's - by vIns - 09-14-2011, 08:15 AM
RE: Finding Links with Paren's - by mv8167 - 09-14-2011, 07:56 PM
RE: Finding Links with Paren's - by Ankesh - 09-15-2011, 11:11 AM
RE: Finding Links with Paren's - by mv8167 - 09-15-2011, 06:36 PM
RE: Finding Links with Paren's - by Ankesh - 09-19-2011, 03:51 PM
RE: Finding Links with Paren's - by mv8167 - 09-19-2011, 07:39 PM
RE: Finding Links with Paren's - by mv8167 - 09-27-2011, 02:42 AM
RE: Finding Links with Paren's - by Ankesh - 09-27-2011, 02:46 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
Exclamation UFT is not finding object in runtime but able to locate the object from repository amar.vallapreddy 1 2,720 02-25-2014, 02:22 PM
Last Post: guin.anirban
  Finding the correct Link mv8167 2 4,405 01-24-2012, 07:58 PM
Last Post: mv8167
  Finding the correct WebTable mv8167 0 2,415 12-07-2011, 02:38 AM
Last Post: mv8167
  Finding WebElements mv8167 7 9,498 06-30-2011, 11:05 PM
Last Post: parminderdhiman84
  Finding a Link mv8167 4 5,633 06-21-2011, 07:04 PM
Last Post: mv8167

Forum Jump:


Users browsing this thread: 1 Guest(s)