Regular expression for SAP - 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 for SAP (/Thread-Regular-expression-for-SAP) Pages:
1
2
|
Regular expression for SAP - lakshjai - 04-08-2008 [/color]hi Ankur, Im usinf SAP application and Im trying to use the regular expression for the below highlighted one: Code: SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "[b]Medical;#1[/b]",strInsuranceName Code: SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "RegExp: =Medical;# \d)*", strInsuranceName but it dint work, pls help me Thanks laksh RE: Regular expression for SAP - Ankur - 04-09-2008 Why do u want to make this value a reg exp?... probably you need to parameterize this. RE: Regular expression for SAP - lakshjai - 04-09-2008 Because the value Medical;#2 will change during run time, its not possible for us to know that value , the actual codewould be like : Code: Select Case strInsuranceName Like this there are many other insurance types, depending upon the countries these insurances varies and it will be in different path, where path is nothing but Medical;#1 ClickLink Method syntax is: object.ClickLink Path, Item pls lemme know , if you need any further information. Thanks in advance RE: Regular expression for SAP - Ankur - 04-10-2008 ok ...go to object repository ...change Medical;#1 to Medical;#[0-9] and tick the regular expression check box RE: Regular expression for SAP - lakshjai - 04-10-2008 Ankur, Sorry for the late reply.. since I live in EST time zone , Im not able to reply u on time... Actually I dont see Medical;#1 in the OR, its just have TableTreeControl objects, andf I tried capturing the Medical;#1 object, but its capturing as TableTreeControl only.... I am wondering whether Medical;#1 is an object .... pls clarify my doubt. Thanks in advance laksh RE: Regular expression for SAP - Ankur - 04-10-2008 no problem laksh... can u attach concerned screenshot(s) for OR etc RE: Regular expression for SAP - lakshjai - 04-10-2008 Here is OR screenshot. lemme know , if u need any further info. Thanks RE: Regular expression for SAP - Ankur - 04-10-2008 In that case simply changing Code: SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "Medical;#1",strInsuranceName Code: SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "Medical;#[0-9]",strInsuranceName should solve the problem. You have to make sure that there is only one unique link on a given page which satisfies this reg expression. Let us know how it goes. RE: Regular expression for SAP - lakshjai - 04-10-2008 Ankur, I have tried this one also before but it dint work.. it is the unique one, in that page.... I have attached the screenshot of the error message RE: Regular expression for SAP - Ankur - 04-10-2008 hmmmm.... well, turn on smart identification....record that piece of code again ...and then run your test...also check for mandatory and assistive properties and base and optional filter properties. let me know the result |