radhika1
8 years agoContributor
how to use a variable in context.expand
 Can u tell me how to use a variable inside this. 
   
 def y =1; 
   
 def g  = context.expand('${Operation#Response#//*//consumerProfile/phoneNumber["+y+"]}'); 
   
 this is not taking 1 as value of...
- 8 years ago
Some other problem with this Xpath then?
def y = 1 assert '${Operation#Response#//*//consumerProfile/phoneNumber[' + y + ']}' ==
'${Operation#Response#//*//consumerProfile/phoneNumber[1]}'