## org.openqa.selenium.server
Class InjectionHelper

    java.lang.Object
      org.openqa.selenium.server.InjectionHelper

    public class InjectionHelper

extends java.lang.Object

Constructor Summary
`InjectionHelper()`

Method Summary
`static boolean` `addUserContentTransformation(java.lang.String before, java.lang.String after)`
`static boolean` `addUserJsInjectionFile(java.lang.String fileName)`
`static void` `init()` re-read selenium js.
`static long` `injectJavaScript(org.mortbay.http.HttpRequest request, org.mortbay.http.HttpResponse response, java.io.InputStream in, java.io.OutputStream out, java.lang.String debugURL)`
`static boolean` `isFailOnError()`
`static java.lang.String` `restoreJsStateInitializer(java.lang.String sessionId, java.lang.String uniqueId)`
`static void` `saveJsStateInitializer(java.lang.String sessionId, java.lang.String uniqueId, java.lang.String jsVarName, java.lang.String jsStateInitializer)`
`static void` `setBrowserSideLogEnabled(boolean browserSideLogEnabled)`
`static void` `setFailOnError(boolean failOnError)`
`static void` `setInjectionHtml(java.lang.String injectionHtml)`
`static void` `setInjectScriptTags(boolean injectScriptTags)`
`static void` `setTryToInjectInHead(boolean tryToInjectInHead)`
`static boolean` `userContentTransformationsExist()`
`static boolean` `userJsInjectionsExist()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### InjectionHelper

    public InjectionHelper()

Method Detail

### setBrowserSideLogEnabled

    public static void setBrowserSideLogEnabled(boolean browserSideLogEnabled)

### setInjectScriptTags

    public static void setInjectScriptTags(boolean injectScriptTags)

### setTryToInjectInHead

    public static void setTryToInjectInHead(boolean tryToInjectInHead)

### setInjectionHtml

    public static void setInjectionHtml(java.lang.String injectionHtml)

### saveJsStateInitializer

    public static void saveJsStateInitializer(java.lang.String sessionId,
                                              java.lang.String uniqueId,
                                              java.lang.String jsVarName,
                                              java.lang.String jsStateInitializer)

### restoreJsStateInitializer

    public static java.lang.String restoreJsStateInitializer(java.lang.String sessionId,
                                                             java.lang.String uniqueId)

### init

    public static void init()

  re-read selenium js. Don't maintain it indefinitely for now since then we would need to restart the server to see changes. Once the selenium js is firm, this should change.

### injectJavaScript

    public static long injectJavaScript(org.mortbay.http.HttpRequest request,
                                        org.mortbay.http.HttpResponse response,
                                        java.io.InputStream in,
                                        java.io.OutputStream out,
                                        java.lang.String debugURL)
                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### addUserContentTransformation

    public static boolean addUserContentTransformation(java.lang.String before,
                                                       java.lang.String after)

### addUserJsInjectionFile

    public static boolean addUserJsInjectionFile(java.lang.String fileName)

### userContentTransformationsExist

    public static boolean userContentTransformationsExist()

### userJsInjectionsExist

    public static boolean userJsInjectionsExist()

### isFailOnError

    public static boolean isFailOnError()

### setFailOnError

    public static void setFailOnError(boolean failOnError)

Copyright © 2009. All Rights Reserved.