I am trying to set local storage using nodeJs + selenium. Actually I tried with Java + Selenium with the below code it works well for me.
JavascriptExecutor js = (JavascriptExecutor) driver;
js.executeScript("localStorage.setItem(arguments[0],arguments[1])", "Id", "{\"_expired\":0,\"_value\":\"133\"}")
But, unable to achieve the same thing using nodeJs, Already tried some methods like-
localStorage.setItem('Id', '{\"_expired\":0,\"_value\":\"133\"}');
but Instead of putting in browser local storage, it is writing on some local files.
I want to set key and value in Application >> Local Storage >>{site url}