Forum Discussion

sha's avatar
sha
Contributor
11 years ago

JavaScript eval crashes Fifo 31

I am using the following Keyword Testing code in my test: Run Code Snippet        Aliases.browser.pageMain.contentDocument.Script.eval("localStorage.setItem(\"lastUsedTextProperties\", '{\"fontStyl...
  • HKosova's avatar
    11 years ago
    Hi Søren,



    You can try accessing localStorage through contentDocument.defaultView:



    Aliases.browser.pageMain.contentDocument.defaultView.localStorage.setItem("lastUsedTextProperties", "{'fontStyle':'400','color':'#008800','fontSize':20,'fontFamily':'Arial'}")