![]() |
Regular expression in Select - 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 Regular Expressions (https://www.learnqtp.com/forums/Forum-UFT-QTP-Regular-Expressions) +--- Thread: Regular expression in Select (/Thread-Regular-expression-in-Select) |
Regular expression in Select - Maverick - 07-13-2009 Hello, A very simple action... I have a JavaList with one of the values "TestNumber1" So I do Code: JavaList("name").Select "TestNumber1" but I would like to make it shorter like: Code: .Select "Test.*" In OR this kind of syntax is OK... but not in string Thanks, RE: Regular expression in Select - supputuri - 07-16-2009 Hi Maverick, Yup i will agree with you, that the select method won't work with regular expression but you can write function/method to select the listitem even with regurlar expression. Please find the below LOC and open the Google page and then paste and run the code. '------------------------------------------------------------------------------------ Code: Browser("name:=Google").Page("title:=Google").Link("name:=Preferences").Click Let me know if you need any more info. RE: Regular expression in Select - Maverick - 07-18-2009 Hello, Thanks a lot. I will implement this function... :-) |