I have seen many examples for fetching the already stored data but didn't get any example for fetching the stored values.
How to store local storage data using Protractor?
Asked Answered
check below answers. #21961098 –
Centurial
Thanks for your quick reply. I already go through to this link but there is no content regarding the storing of the values using protractor. –
Anaclitic
You can access localStorage through browser.executeScript() this way:
Get value
var value = browser.executeScript("return window.localStorage.getItem('myKey');");
Set value
browser.executeScript("window.localStorage.setItem('myKey', 'myValue');");
Thanks for quick reply. But this is for retrieval operation not for storing purpose. –
Anaclitic
© 2022 - 2024 — McMap. All rights reserved.