@Override public Object lookup(ArquillianResource resource, Annotation... qualifiers) { GrapheneContext context = GrapheneContext.getContextFor(ReflectionHelper.getQualifier(qualifiers)); try { return context.getWebDriver(Class.forName(getReturnType())); } catch (ClassNotFoundException ex) { //the external users: // - does not have any chance to build a test with classes which are not added on classpath //the intern usage of Providers: // - the class path may contain a different version of Selenium // - problem with internal use of Actions, Javascript, Mouse throw new IllegalStateException("The class of the provider is not on the class path.", ex); } } }
@Override public Object lookup(ArquillianResource resource, Annotation... qualifiers) { GrapheneContext context = GrapheneContext.getContextFor(ReflectionHelper.getQualifier(qualifiers)); try { return context.getWebDriver(Class.forName(getReturnType())); } catch (ClassNotFoundException ex) { //the external users: // - does not have any chance to build a test with classes which are not added on classpath //the intern usage of Providers: // - the class path may contain a different version of Selenium // - problem with internal use of Actions, Javascript, Mouse throw new IllegalStateException("The class of the provider is not on the class path.", ex); } } }