* If there was an error creating the test object.
*/
@Override
protected Object createTest() throws Exception {
final Object test = super.createTest();
final TestClass testClass = getTestClass();
final String browser = seleniumFactory.getBrowser();
List<FrameworkField> fields = testClass
.getAnnotatedFields(annotationType);
for (final FrameworkField field : fields) {
FieldUtils.writeField(field.getField(), test, selenium, true);
}
fields = testClass.getAnnotatedFields(SeleniumBrowser.class);
for (final FrameworkField field : fields) {
FieldUtils.writeField(field.getField(), test, browser, true);
}
final List<MethodRule> rules = testClass.getAnnotatedFieldValues(
test, Rule.class, MethodRule.class);
for (final MethodRule rule : rules) {
final Field[] ruleFields = rule.getClass().getDeclaredFields();
for (final Field ruleField : ruleFields) {
if (ruleField.getAnnotation(annotationType) != null) {