Reputation: 5396
I am building Jmeter test plan, in website I have one text both and as soon as I enter any value in textbox, it calculates something and populate one value. Here there is no post/get request. So how can I input some value in such case?
I even recorded everything but did not see that value is posting so somehow I will have to enter value into textbox via jmeter without get/post.
In below screenshot 880 is value which I want to insert via Jmeter.
Html code of text box is :
<input type="number" class="form-control amount_value" id="x_amount" name="amount" placeholder="Number of values" required="required" onkeyup="getprice('SIP','sip-amount',this.value,'4.5556665565')">
Upvotes: 0
Views: 1754
Reputation: 168147
As per JMeter project main page:
JMeter is not a browser, it works at protocol level. As far as web-services and remote services are concerned, JMeter looks like a browser (or rather, multiple browsers); however JMeter does not perform all the actions supported by browsers. In particular, JMeter does not execute the Javascript found in HTML pages. Nor does it render the HTML pages as a browser does (it's possible to view the response as HTML etc., but the timings are not included in any samples, and only one sample in one thread is ever displayed at a time).
So you have 2 options:
getprice()
JavaScript function using JSR223 PostProcessor with preferably Groovy language Upvotes: 1