@Singleton public class

JavascriptRunner

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

Class Overview

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.

Summary

Public Constructors
JavascriptRunner()
Public Methods
void clearWebSudo()
Drop the user's Websudo authentication session.
void destroyAllXsrfTokens()
Wipe out all the XSRF tokens on the page.
void execute(String script)
void removeWorkflowDesignerUnloadHooks()
The workflow designer adds unload hooks that can stop people leaving the page while it is doing something.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public JavascriptRunner ()

Public Methods

public void clearWebSudo ()

Drop the user's Websudo authentication session.

public void destroyAllXsrfTokens ()

Wipe out all the XSRF tokens on the page.

public void execute (String script)

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