Is there a way to save variable in a Webpagetest script? e.g. I have this javascript code that works in my developer tools:
var range = document.createRange();
var sel = window.getSelection();
range.setStart(document.getElementById("editable").childNodes[0], 5);
sel.removeAllRanges();
sel.addRange(range);
I need the range variable to be saved as in line 1 so that I can modify it in Line 3, and reuse it in line 5. If i try to execute the following WPT command.
execAndWait var range=document.createRange()
//or execAndWait range=document.createRange()
I get an error. Does this mean there is no way I can modify a variable in Webpagetest script?