browser.executeScript errors
Hi,
in my test i have a piece of code that the browser.executeScript executes but there are some errors with it that i cant fix
this is the browser.executeScript code : browser.executeScript('var allcookies = document.cookie;cookiearray = allcookies.split(";");for(var i=0; i<cookiearray.length; i++){name = cookiearray[i].split("=")[0];value = cookiearray[i].split("=")[1];console.log("Key is : " + name + " and Value is : " + value);}sidValue = value;console.log(value);console.log(sidValue);receiptNumber = $scope.row.nr;window.location.href("https://www.mysite.nl/info?sid="+ sidValue +"&filter={nr:"+ receiptNumber + "}");');
i have two problems :
- $scope.row.nr ,it says that $scope is not defined.
- on my window.location.href it saysProperty 'href' of object [object Location] is not a function (when i remove href it says the same only about location).
Does anybody knows how to fix this?
This seems like a good question for StackOverflow. Please ask it there, so we can keep github issues clean for bug reports and feature requests!