pecks
pecks

Reputation: 340

Entering password characters in JMeter based on captcha request

Are there any techniques that can be used to log in to a website with JMeter, when you are asked for the x,y,z characters of the password?

edit: a little more info: I'm recording HTTP requests, and for our local environment you just login with the password, which works fine. For the "live" site it asks for random different characters.

Upvotes: 1

Views: 202

Answers (1)

UBIK LOAD PACK
UBIK LOAD PACK

Reputation: 34566

In order to implement what you want you have to proceed this way:

def start = vars["start"];
def end = vars["end"];
def password = vars["password"]; // This can come from a CSV or be hard coded if it does not change
vars.put("passwordExtract", password.substring(start, end));
  • You can then use ${passwordExtract} to input the value in next request

Upvotes: 1

Related Questions