Jmeter: login recorded script not working: getting error javascript not enabled

2.5k views Asked by At

login in issue: On running jmeter script recorded through workbench scriptrecorder, getting an error java script is not enabled, not able to complete test. tried to disable cookie manager still login is not working. getting message page got refreshed before navigating to next page. getting login screen only under listener view results tree view.

steps that i did: created test plan, added thread gp, added config element cache manage, cookie manager, HTTP default then added recording controller recorded script via workbench recording controller.

tried same script via transactional controller and blazemeter recorder. All scripts are failing at same point. login is not happening so not moving any further.

Any help would be appreciated. thanks

1

There are 1 answers

5
Dmitri T On

Record and replay will not work in the majority of cases, modern web applications are quite complex and they use dynamic parameters for different reasons, i.e. for page-level state management or security reasons. So if you record this parameter and will try to re-use it while replaying it will not work.

The process of handling dynamic parameters in JMeter is known as correlation and looks like:

  1. Record your scenario 2 times
  2. Compare 2 scripts to identify any dynamic values (don't forget to look not only into HTTP Request parameters, but inspect request headers as well, it can be done using View Results Tree listener)
  3. Once you identify the dynamic parameters you will need to extract them from previous response, convert them info JMeter Variables and add them to the next request. You can consider using the following test elements for extracting the dynamic values from the responses:

  4. Validate variables values using Debug Sampler and run the whole test to ensure that it is doing what it is supposed to be doing.