| || |
Ajax TruClient Radio Button evalXPath
I have been receiving the following error for Ajax TruClient script in IE browser. I receive this error while trying to click on a radio button that is parameterized.
evalXPath("//input[@type=\"radio\" and @name=\"person\" and @Value=\"John*C*Donald\"]");
The "C" character in the middle of the first and the last name does not change regardless of any of the entries chosen. It might stand in middle to show that there is a column in the middle of the both variables, which is true.
Following is my modified code for the radio button click:
evalXPath("//input[@type=\"radio\" and @name=\"xyz\" and @Value=\""+LR.getParam("Var1")+"*C*"+LR.getParam("Var2 ")+"\"]");
I have both Var1 and Var2 parameters in the Parameters folder. They both have correct values to be input to the above mentioned line of code, which is John and Donald respectively.
Some other information:
1.) Type of Action is "Click" with End Event: Automatic: Not Set Yet
2.) The arguments of the radio button are: Button, X Coordinate, Y Coordinate, Ctrl Key, Alt Key and Shift Key. All of these fields are blank.
Originally Posted by Nick_Tester
You need to preface any TruClient functions with ArgsContext in order to access them in a evalXPath function. See my thread SWales - TruClient Knowledgebase for more info.
Also you may see references to TC.getParam as well as LR.getParam. Seems HP is trying to standardize by using TC now... but they both do the same thing.
evalXPath("//input[@type=\"radio\" and @name=\"xyz\" and @Value=\""+ArgsContext.LR.getParam("Var1")+"*C*"+ArgsC ontext.LR.getParam("Var2")+"\"]");