Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Regular expression for SAP
#1
Not Solved
[/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
I tried using like :

Code:
SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "RegExp: =Medical;# \d)*", strInsuranceName

but it dint work, pls help me



Thanks
laksh
Reply
#2
Not Solved
Why do u want to make this value a reg exp?...

probably you need to parameterize this.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Not Solved
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
Case "Blue Cross/Blue Shield"
                           SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "Medical;#2",strInsuranceName

Case "Aetna"
SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "Medical;#1",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
Reply
#4
Not Solved
ok ...go to object repository ...change Medical;#1 to Medical;#[0-9] and tick the regular expression check box
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#5
Not Solved
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
Reply
#6
Not Solved
no problem laksh...

can u attach concerned screenshot(s) for OR etc
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#7
Not Solved
Here is OR screenshot. lemme know , if u need any further info.

Thanks


Attached Files
.doc   OR.doc (Size: 104.5 KB / Downloads: 176)
Reply
#8
Not Solved
In that case simply changing

Code:
SAPGuiSession("Session").SAPGuiWindow("Enrollment").SAPGuiTree("TableTreeControl").ClickLink "Medical;#1",strInsuranceName
to

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.
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#9
Not Solved
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


Attached Files
.doc   error.doc (Size: 123.5 KB / Downloads: 145)
Reply
#10
Not Solved
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
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Need Any digit in xpath path using Regular expression Priyam 1 3,484 10-05-2016, 11:05 AM
Last Post: Ankur
  Regular expression to read two words in lowercase, uppercase and with and without spa sarahq49 1 3,351 04-09-2015, 01:56 AM
Last Post: sarahq49
  Regular expression and script optimisation Padmavathy 1 3,817 03-30-2015, 11:46 AM
Last Post: supputuri
  Regular expression in descriptive programming testernc 1 16,565 12-08-2014, 06:38 PM
Last Post: anshika.agarwal
  need a regular expression. anu05446 0 3,114 11-26-2014, 03:00 PM
Last Post: anu05446

Forum Jump:


Users browsing this thread: 2 Guest(s)