@Override public Object getTarget() { return getContext(true).getWebDriver(); } };
@Override public GrapheneConfiguration getConfiguration() { return getContext(true).getConfiguration(); }
@Override public Void call() throws Exception { CURRENT_CONTEXT.set(finalContext); return null; } });
private WebDriver getWebDriver() { return GrapheneContext.getContextFor(Default.class).getWebDriver(); } }
/** * Get context associated to the given qualifier. If the {@link Default} qualifier is given, the returned context tries to * resolves the active context before each method invocation. If the active context is available, the returned context * behaves like the active one. */ public static GrapheneContext getContextFor(Class<?> qualifier) { return INSTANCE.getContextFor(qualifier); }
/** * Removes the context associated to the given qualifier. * * @param qualifier * @see #setContextFor(org.jboss.arquillian.graphene.spi.configuration.GrapheneConfiguration, org.openqa.selenium.WebDriver, * java.lang.Class) */ public static void removeContextFor(Class<?> qualifier) { INSTANCE.removeContextFor(qualifier); }
@Override public Void call() throws Exception { CURRENT_CONTEXT.remove(); return null; } });
/** * Returns last known context which has been access by a test */ public static GrapheneContext lastContext() { return INSTANCE.lastContext(); }
/** * Creates a new context for the given webdriver, configuration and qualifier. <strong>When you create the context, you are * responsible to invoke {@link #removeContextFor(java.lang.Class) } after the context is no longer valid.</strong> * * @return created context * @see #getContextFor(java.lang.Class) * @see #removeContextFor(java.lang.Class) */ public static GrapheneContext setContextFor(GrapheneConfiguration configuration, WebDriver driver, Class<?> qualifier) { return INSTANCE.setContextFor(configuration, driver, qualifier); }
@Override public GrapheneContext lastContext() { return CURRENT_CONTEXT.getLast(); }
private WebDriver getWebDriver() { return GrapheneContext.getContextFor(Default.class).getWebDriver(); } }
@Override public Object getTarget() { return getContext(true).getWebDriver(); } };
@Override public GrapheneConfiguration getConfiguration() { return getContext(true).getConfiguration(); }
@Override public Void call() throws Exception { CURRENT_CONTEXT.set(finalContext); return null; } });
/** * Get context associated to the given qualifier. If the {@link Default} qualifier is given, the returned context tries to * resolves the active context before each method invocation. If the active context is available, the returned context * behaves like the active one. */ public static GrapheneContext getContextFor(Class<?> qualifier) { return INSTANCE.getContextFor(qualifier); }
/** * Removes the context associated to the given qualifier. * * @param qualifier * @see #setContextFor(org.jboss.arquillian.graphene.spi.configuration.GrapheneConfiguration, org.openqa.selenium.WebDriver, * java.lang.Class) */ public static void removeContextFor(Class<?> qualifier) { INSTANCE.removeContextFor(qualifier); }
@Override public Void call() throws Exception { CURRENT_CONTEXT.remove(); return null; } });
/** * Returns last known context which has been access by a test */ public static GrapheneContext lastContext() { return INSTANCE.lastContext(); }
/** * Creates a new context for the given webdriver, configuration and qualifier. <strong>When you create the context, you are * responsible to invoke {@link #removeContextFor(java.lang.Class) } after the context is no longer valid.</strong> * * @return created context * @see #getContextFor(java.lang.Class) * @see #removeContextFor(java.lang.Class) */ public static GrapheneContext setContextFor(GrapheneConfiguration configuration, WebDriver driver, Class<?> qualifier) { return INSTANCE.setContextFor(configuration, driver, qualifier); }
@Override public GrapheneContext lastContext() { return CURRENT_CONTEXT.getLast(); }