Micro Focus QTP (UFT) Forums
Descriptive Program - Not able to use object property which is having Bracket - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Descriptive Program - Not able to use object property which is having Bracket (/Thread-Descriptive-Program-Not-able-to-use-object-property-which-is-having-Bracket)



Descriptive Program - Not able to use object property which is having Bracket - srselva - 09-28-2012

In my application many links has brackets along with the name

eg:
Code:
Browser("name:=xxx").Page("name:=yyy").link("text:=(zzz)").click

QTP throws an error for this code, because the link has brackets.

i would like to exactly valaite the name of the link..


RE: Descriptive Program - Not able to use object property which is having Bracket - Ankesh - 09-28-2012

@srselva,

the brackets has a special meaning in vbscript. They are used in regular expression. You need to escape them using escape character "\".

try the below code.

Code:
Browser("name:=xxx").Page("name:=yyy").link("text:=\(zzz\)").click
Regards,
Ankesh


RE: Descriptive Program - Not able to use object property which is having Bracket - srselva - 09-28-2012

Thanks..Smile