I have tried a couple to javascript commands, which are mentioned in the WAPT Help, in my script.
Below mentioned is the Javascript:
var doc = context.document;
var body = context.responseBody;
var header = context.responseHeader;
var userID = context.userID;
var sessionNumber = context.sessionNumber;
context.variable("test") = "testvar";
log.message(doc.forms[0].getElementById("id").value);
After Test Run, in the log it is saying "JavaScript failed. Object doesn't support this property or method".
Instead of forms[0] I have also tried with the formname in the response code. I tried these inside a function. Then javascript didn't fail but nothing was executed. Everything was blank.
How can I access HTML DOM through javascripts. Is there some settings to be changed? I have attached a screenshot of javascript and the result log.
Attached File(s)
-
Screenshot_02.PNG (28.3K)
Number of downloads: 8 -
Screenshot_01.PNG (69.74K)
Number of downloads: 11

Help










