I am learning how to use descriptors. With descriptors I can randomly get values from a list box, or i can pick a specific ordinal. But i want to use a parameter in the Desciptor editor. I put text equals pPassengers (where the pPassengers is a parameter). I also tried with ArgsContext.pPassengers but the object is not found. It seems like it can't interpret the parameter. The pPassengers parameter exists and it is just a number 6.
I also tried with xpath. The xpath cmd is //li[text()="6"] so I just want to put a pPassengers in place of the 6.
I tried to change it to evalXPath("//li[text()='" + ArgsContext.pPassengers + "']");
For your instance, in Descriptor dialog, you need to first set the text mode to "JS", and then call it by "ArgsContext.TC.getParam("xxx");"
Yes i am in TruClient and that worked for descriptors. Can you tell me the correct syntax for Xpath?
I see this code: //li[text()="3"]
I tried different versions of //li[text()='ArgsContext.TC.getParam(“pPassengers”)']
For your instance, something like below, you may need to adjust it as needed.
evalXPath("//li[text()=' " +ArgsContext.TC.getParam("myParam")+ " ']");
And here is a doc may help you understand more:
if this solved you issue, please kindly mark the thread as solved.