Pal
Pal

Reputation: 235

JMeter is not able to record and play "Checkbox" in webpage properly

In one of my performance test scenario, user has to select one check box and then click on save button , I am able to record the scenario but unable to play. Steps are as follows:

  1. Log in to the application
  2. Go to Page 1 and click on any “Check box” and then click on save button.

For one user script was able to record but while running for multiple users I found that script is not checking the “Check box”. Does any body has any clue on this ?

Upvotes: 3

Views: 3350

Answers (2)

Piku
Piku

Reputation: 9

Jmeter does not recognise the elements written in javascript. Try this:

  1. Open Blazemeter
  2. Go to advanced options
  3. Select Cookies and Javascript Option under Request to Record

This solution worked for me.

Upvotes: 0

Aliaksandr Belik
Aliaksandr Belik

Reputation: 12873

Jmeter DOES NOT support Javascript.

As per Jmeter FAQ:

JMeter does not process Javascript or applets embedded in HTML pages. . . . If the page uses Javascript to build up a URL or submit a form, you can use the Proxy Recording facility to create the necessary sampler. If this is not possible, then manual inspection of the code may be needed to determine what the Javascript is doing.

JMeter is a tool for testing server code, not the client one. Both recording and playback happens at the HTTP layer.

What you can do in your case is:

  • use any traffic inspector tool to record http request (upon "Save");
  • analyze request and its parameters sent;
  • setup request manually in jmeter.

Check/unchecking check box in your scenario doesn't generate any traffic itself BUT sets the value of request parameter sent along with further http request upon further "Save".
You have to set value of this param manually to the value which is equivalent to "checked" state of check box.

Upvotes: 5

Related Questions