Unanswered question

how can we define "document.getElementById" in JS library?

I have a javascript function that contains "document.getElementById", but the problem is that I can't run it at JS library level.
when I ran it, I had the following error: ReferenceError: "document" is not defined.
How can i fix it?

manal C.
manal C.

manal C.

42 / 100


As NeoLoad is protocol based vs Browser-based you have no access to the DOM of the page and you cannot access browser objects like document or window.

You have to extract the required value with a Variable Extractor on the returned HTML, and then use it in the Javascript by using context.variableManager.getValue(myExtractedVarname)