Hello everyone.
Need to automatically apply current date to a date field each time my web transaction is re-played. Shown below is the code from dynatrace synthetic script.
I added the following "var date = (today.getMonth()+1)+‘-’+today.getDate()+‘-’+today.getFullYear() to the TextValue field.
Each time web transaction is replayed, the date field is not displaying the current date. I only see the text from the code.
Any help would be greatly appreciated.
I am new to json coding but I am eager to learn!
Thank You!
}, {
“type”: “keystrokes”,
“target”: {
“locators”: [{
“type”: “css”,
“value”: “input[name=\“dos\”]”
}, {
“type”: “dom”,
“value”: “document.forms[\“Form1\”][9]”
}, {
“type”: “css”,
“value”: “.form-control:eq(2)”
}, {
“type”: “css”,
“value”: “#Form1 div:nth-child(5) div:nth-child(2) div:nth-child(2) div:nth-child(3) div:nth-child(2) input”
}, {
“type”: “css”,
“value”: “#Form1 div.panel div.panel-body div.form-horizontal div.form-group div.col-sm-8 input.form-control:eq(0)”
}]
},
“masked”: false,
“simulateBlurEvent”: true,
“description”: “keystrokes on \“dos\””,
“textValue”: “var date = (today.getMonth()+1)+‘-’+today.getDate()+‘-’+today.getFullYear()”
}, {
