Class JavascriptRunner

java.lang.Object
com.atlassian.jira.pageobjects.util.JavascriptRunner

@Singleton public class JavascriptRunner extends Object
Class that can be used to execute JS on the browser while running WebDriver tests. It also contains methods to run useful common JS on the browser.
Since:
v6.2
  • Constructor Details

    • JavascriptRunner

      public JavascriptRunner()
  • Method Details

    • destroyAllXsrfTokens

      public void destroyAllXsrfTokens()
      Wipe out all the XSRF tokens on the page.
    • clearWebSudo

      public void clearWebSudo()
      Drop the user's Websudo authentication session.
    • removeWorkflowDesignerUnloadHooks

      public void removeWorkflowDesignerUnloadHooks()
      The workflow designer adds unload hooks that can stop people leaving the page while it is doing something. This causes problems in the tests so we just remove these hooks in the tests. Ideally we should be able to wait for the WD to tell us that it is not busy.

      REF: CAS-580

    • execute

      public void execute(String script)