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

Re: Exiting a script using TruClient

$
0
0

Actually, you kinda CAN do it through a combination of Javascript and an IF block.

 

Create a variable in your Javascript to output your result.

Next step, add an IF block and drag the exit to the if block. Your conditional for the if block will be based on your variable.

 

example:

 

I have a Javascript that looks within the Document for a specific folder ID and assignes "true" or "false" to variable "Found" depending on if it finds it.

 

In the IF block I set    If (Found=="true")

 

then put the action I want if it's true

add an "else"

drag the Exit into the Else.

 

That's the easiest way to do it.  I created a string variable instead of boolean as I could never get the IF block to work with a boolean.

 

I have tried other ways but found the IF block only accepts one arguement for the IF statement.


Viewing all articles
Browse latest Browse all 12134

Trending Articles



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