Quantcast
Channel: All LoadRunner Practitioners Forum posts
Viewing all articles
Browse latest Browse all 12134

TC_FF: evalXPath will not evaluate variable inside of for loop

$
0
0

Suppose I have an XPath like this:

evalXPath("(//a[text()=\"2\"])[1]");

Success! Object found.
 

 

Now suppose I variablize it:

var q=2;
evalXPath("(//a[text()=\""+q+"\"])[1]");

Success! Object found.

 

 

Now suppose I wrap it in a for loop:

For (var q=1; q<8; q++)
evalXPath("(//a[text()=\""+q+"\"])[1]");

FAIL


Why?


Viewing all articles
Browse latest Browse all 12134

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>