Skip to content

Commit 6282ebd

Browse files
committed
[-] fix automation name
[-] fix variable names
1 parent 575c1e0 commit 6282ebd

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/main/java/io/appium/java_client/pagefactory/AppiumAnnotations.java

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,8 @@ By getBy(Annotation annotation) {
144144
mobileField = field;
145145
this.platform = String.valueOf(platform).
146146
toUpperCase().trim();
147-
this.automation = String.valueOf(automation);
147+
this.automation = String.valueOf(automation).
148+
toUpperCase().trim();
148149
}
149150

150151
private static void checkDisallowedAnnotationPairs(Annotation a1,
@@ -270,21 +271,21 @@ public By buildBy() {
270271
SelendroidFindBy selendroidBy = mobileField
271272
.getAnnotation(SelendroidFindBy.class);
272273
if (selendroidBy != null && ANDROID.toUpperCase().equals(platform) &&
273-
"Selendroid".equals(automation)) {
274+
"Selendroid".toUpperCase().equals(automation)) {
274275
return getMobileBy(selendroidBy, getFilledValue(selendroidBy));
275276
}
276277

277278
SelendroidFindBys selendroidBys = mobileField
278279
.getAnnotation(SelendroidFindBys.class);
279-
if (selendroidBy != null && ANDROID.toUpperCase().equals(platform) &&
280-
"Selendroid".equals(automation)) {
280+
if (selendroidBys != null && ANDROID.toUpperCase().equals(platform) &&
281+
"Selendroid".toUpperCase().equals(automation)) {
281282
return getMobileBy(selendroidBys, getFilledValue(selendroidBys));
282283
}
283284

284285
SelendroidFindAll selendroidAll = mobileField
285286
.getAnnotation(SelendroidFindAll.class);
286-
if (selendroidBy != null && ANDROID.toUpperCase().equals(platform) &&
287-
"Selendroid".equals(automation)) {
287+
if (selendroidAll != null && ANDROID.toUpperCase().equals(platform) &&
288+
"Selendroid".toUpperCase().equals(automation)) {
288289
return getMobileBy(selendroidAll, getFilledValue(selendroidAll));
289290
}
290291

0 commit comments

Comments
 (0)