Ajax true client parameterization problem
Question ID: 104486
0
0

Hi,
I am new on load runner and started working on LR n using ajax true client protocol to test a web application which contains ajax pages n dynamic data lyk google maps. I am having parameterization problem. I am testing it on ff…

For example on login screen if I want to pass parameter to userid field: username=LR.getParam("paramter name")

then it shows error that Evaluate JS Username=LR.getParam("ParameterName1") ** failed – an argument is invalid: ‘Code’: JavaScript exception ‘ReferenceError : LR is not defined’ during evaluation.

Please help me that how can i get rid of this problem.
thanks..
Ashhad

Marked as spam
Posted by (Questions: 4, Answers: 5)
Asked on April 3, 2012 6:56 am
228 views
Answers (5)
0
Private answer

Dear,

I am using LR 11.03 patch and I followed the same ur way...but it did not work..

recorded script..and replace the user id value with paramter in Argument section.

then it gives following error:

t=00010025ms: Error -203253: ** 6: Type [Exception] in User ID textbox ** failed - an argument is invalid:
'Value': JavaScript exception 'ReferenceError: LR is not defined' during evaluation [MsgId: MERR-203253]

Marked as spam
Posted by (Questions: 4, Answers: 5)
Answered on April 10, 2012 1:37 am
1
Private answer

Hello Ashhad,

If you are using LR 11.04 then you do not need the ''uid='' part just this

LR.getParam(''username'')

Replace the Original values ''username'' in the step's Argurment section And you'll need to create a parameter list in the Vugen for the ''username''

Question : What LoadRunner patches do you have installed???

To check open Vugen> Help> about .... If you want to use Ajax Truclient and the have the Ajax Truclient Help Documents you MUST have LR 11.03 or LR.04

*******Best way to Parameterize a value do this:*********

1. Recorded your Script
2. Find the step you want to parameterize Press the expend step arrow (right side)
3. Open the ''Arguments'' subsection to see your Value
4. Highlight EVERYTHING in the Value box, (yes the '' '' too)
5. Right Click on the highlighted Value and select ''Replace with a Parameter''
6. The ''Enter Parameter Name'' popup will appear
7. Change the ''Parameter Name''
8. Press ''OK'' (this Bring the Vugen to the front)
9. Press the ''parameter properties'' icon
10. Add and Adjust Parameter as needed
11. Press ''Close''
12. Note the Value is now [ LR.getParam(''USER_ID'' ]
13. TO check the code move the mouse to the right of the Values: Box and click on the JS when it appears
14. Press OK

Marked as spam
Posted by (Questions: 12, Answers: 384)
Answered on April 9, 2012 11:37 am
0
Private answer

I installed the firefox 3.6.3 version and again played my script...still it does not work

I have done following steps:

step1: Evaluate JS script having code uid=LR.getParam(''ParameterName'')

steps2: Under username tab, Value= uid

but when the script runs it stops on step1 and shows following error.

''uid=LR.getParam(''ParameterName'') ** failed - an argument is
invalid: 'Code': JavaScript exception 'ReferenceError : LR is not
defined' during evaluation.''

Please need help..I dont know why it is not working at my end even I have checked the same steps for HP Webtour site.

Marked as spam
Posted by (Questions: 4, Answers: 5)
Answered on April 8, 2012 2:16 am
0
Private answer

Dear,

Thanks for your reply.

I have tried every option to do it.

I have already done the steps mentioned by you. In every case it says ''failed - an argument is invalid: 'Code': JavaScript exception 'ReferenceError : LR is not defined' during evaluation.''

even I tried to put the Evaulate JS script uid= lr.getParam(''paramter name'');
after the navigation screen.

then I changed the Value of useridtext field with uid
still it does not work

even I put some wait commands there so that it takes time to get the object and then execute js script even though it did not work.

I am using ff 7 version so it might be problem. I am gonna install ff 3.6.3 and then check. if you got another solution then pls help me.

or you can verify by urslf by running any site and record userid field with paramterization.

thanks.

Marked as spam
Posted by (Questions: 4, Answers: 5)
Answered on April 4, 2012 7:08 am
1
Private answer

Hello Ashhad,

1. Ensure your LoadRunner System ( all machines) are patches to LR 11.04 there are numerous enhancements and fixes to the Ajax TruClient Protocol

Then to Parameterize the Username

1. In the Develop script mode
2. Highlight the ''username'' ( highlight the Quote marks )
3. Right click and Select ''Replace with Parameter''
4. Then add more usernames in the parameter properties window of the VuGen

Marked as spam
Posted by (Questions: 12, Answers: 384)
Answered on April 3, 2012 9:55 am
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top