I am trying to access global variables using webdriver with javascript.
my code:
this.Then(/^I read global var$/, function (selectedElement) {
readGlobalVar(window.location.href);
});
function readGlobalVar(varName){
return varName;
}
the error: ReferenceError: window is not defined