When I make HTTP Request in JMeter I get Response data like "This page uses JavaScript and requires a JavaScript enabled browser." How is it possible to fix this problem.
4 Answers
JMeter is not a browser, and does not interpret the JavaScript in downloaded pages.
From the JMeter wiki:
JMeter does not process Javascript or applets embedded in HTML pages.
JMeter can download the relevant resources (some embedded resources are downloaded automatically if the correct options are set), but it does not process the HTML and execute any Javascript functions.
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.
Depending on what you are doing, you could create an execution test using Selenium IDE for Firefox. The test will run in your browser so the JavaScript will also run. Note though that I never used Selenium as a substitute for JMeter and don't know about common features to both the tools.

- 58
- 6
-
I used Proxy Recording and I can see the variable that I entered but in Response I get that message, also this message is the same as when I run in Firefox with disable JavaScript. Is it possible to test like this application with JMeter. – Ballon Jul 27 '10 at 14:42
-
1It really depends on what you are testing for. JMeter was initially created to test server functionality (under heavy load, for performance, response time etc). If JavaScript is just used for GUI effects that don't interact with the functionality of the app (i.e. to make it looks fancy) then you can use JMeter to test that functionality, bypassing the message you get (it should be a filter of some sort in your app that tests for JS enabled that you can turn off). If on the other hand JavaScript is a must, then you need browser capabilities and JMeter does not (at least yet) provide those. – Jul 27 '10 at 17:43
You can add WebDriver to JMeter test to fully evaluate the page rendering.
Web Driver Sampler automates the execution and collection of Performance metrics on the Browser (client-side). A large part of performance testing, up to this point, has been on the server side of things. However, with the advancement of technology, HTML5, JS and CSS improvements, more and more logic and behaviour have been pushed down to the client. This adds to the overall perceived performance of website/webapp, but this metric is not available in JMeter. Things that add to the overall browser execution time may include:
- Client-side Javascript execution - eg. AJAX, JS templates
- CSS transforms - eg. 3D matrix transforms, animations
- 3rd party plugins - eg. Facebook like, Double click ads, site analytics, etc
All these things add to the overall browser execution time, and this project aims to measure the time it takes to complete rendering all this content.
Official guide: https://jmeter-plugins.org/wiki/WebDriverTutorial/

- 14,397
- 15
- 77
- 118