Micro Focus QTP (UFT) Forums
Descriptive programming and Reg Expression - 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 programming and Reg Expression (/Thread-Descriptive-programming-and-Reg-Expression)



Descriptive programming and Reg Expression - sqadri - 01-20-2012

Hi,

I am trying to read text in a link which is dynamic and mixture of characters and digits. I ma trying to do the following but I am not sure if it will work. Could you please help me with this.

Code:
Set ObjectDes = Description.Create
        ObjectDes("micclass").Value = "Link"
        ObjectDes("html tag").Value = "A"
        ObjectDes("name").Value =" \w+\w+\s+\w+\w+\s+\w+\d+\d+\d+\d"
        Set myLink = Page.ChildObjects(ObjectDes)
        LinkCount = myLink.Count
        For n=0 To LinkCount-1
            Set CoverageCode = myLink(n).GetROProperty("name")
            Print CoverageCode

        Next
Thank you,
Sqadri


RE: Descriptive programming and Reg Expression - Ankesh - 01-23-2012

Have you tried executing the code? What error/challanges are you facing?


RE: Descriptive programming and Reg Expression - sqadri - 02-01-2012

Hi Ankesh,

No I have not tried it yet but I will and let you know.

Thanks,
Sqadri


RE: Descriptive programming and Reg Expression - rajpes - 02-01-2012

what's the pattern of name?give some examples