public final class GrapheneSeleniumContext extends Object implements InvocationHandler
Context for keeping thread local context of GrapheneSelenium.
Provides getProxy() method for accessing that context over model of your tests.
Proxy specifically handles the situations when no context is set - in this situation, runtime exception with IllegalStateException cause is thrown.
Especially, the ExtendedTypedSelenium.isStarted() method is handled in that situation, it returns false instead of
throwing exception. Therefore it can be safely used for obtaining current status of Selenium initialization.
| Modifier and Type | Method and Description |
|---|---|
static GrapheneSelenium |
getProxy()
Returns the instance of proxy to thread local context of AjaxSelenium
|
Object |
invoke(Object proxy,
Method method,
Object[] args)
End point for handling invocations on proxy
|
static boolean |
isInitialized()
Returns true of the context is initialized
|
static void |
set(GrapheneSelenium selenium)
Sets the AjaxSelenium context for current thread
|
public static void set(GrapheneSelenium selenium)
selenium - the AjaxSelenium instancepublic static boolean isInitialized()
public static GrapheneSelenium getProxy()
Copyright © 2013 JBoss by Red Hat. All Rights Reserved.