There is one POST request which submits both Date of Birth & Age.
I found the Date of Birth from previous request, extracted it through Regular Expression Extractor, and passing the Variable in the POST request.
But I did not found the Age from the previous request. Tried figuring out the Age element through Firebug also. But it's not located, due to this field is auto calculated by the Date of Birth field and also the field is read-only.
How do I get the value of Age field?
Possible solution could be using some Jmeter in-built function or by writing some Program in any Scripting Language. But I do not know how to do it in Jmeter.
Thanks in advance.
Given that you have variable i.e. "birthdate" with the value of "1970-05-15" you can figure out person's age with the Beanshell PreProcessor as follows:
Put the following code into the PreProcessor's "Script" area
${age}
See SimpleDateFormat JavaDoc for explanation of "yyyy-mm-dd" pattern and information on how to define the one which matches your application date and time format and How to use BeanShell: JMeter's favorite built-in component guide to learn about scripting in JMeter.