private static Instruments getImplementation(Class clazz, ServerSideSession serverSideSession) throws Exception{
try {
Constructor c = clazz.getConstructor(ServerSideSession.class);
return (Instruments)c.newInstance(serverSideSession);
} catch (NoSuchMethodException e) {
throw new WebDriverException(
"The instruments implementation must have a constructor taking a ServerSideSession as a parameter.");
} catch (InvocationTargetException e){
throw (Exception)e.getTargetException();
}
}