Here my code:

I am getting null exception

     String sItem = getItemFromLocalStorage("value");

    public static String getItemFromLocalStorage(String key)
        return (String) js.executeScript(String.format(
            "return window.localStorage.getItem('adminIdToken');", key));
  • Could you add a full valid code block and the error stacktrace? You can have a problem either on the js attribute or the key argument. – João Farias Jul 1 '19 at 11:41
  • Are you using an Augmenter to access the driver internals? – John Meyer Jul 10 '19 at 23:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.