|
| 1 | +package io.appium.java_client.pagefactory_tests.widget.tests.android; |
| 2 | + |
| 3 | +import io.appium.java_client.pagefactory.AndroidFindBy; |
| 4 | + |
| 5 | +import java.util.List; |
| 6 | + |
| 7 | +public class WidgetManager { |
| 8 | + |
| 9 | + public static String ANDROID_DEFAULT_WIDGET_LOCATOR = "SOME_ANDROID_DEFAULT_LOCATOR"; |
| 10 | + |
| 11 | + public static String ANDROID_EXTERNALLY_DEFINED_WIDGET_LOCATOR = "SOME_ANDROID_EXTERNALLY_DEFINED_LOCATOR"; |
| 12 | + |
| 13 | + @AndroidFindBy(uiAutomator = "SOME_ANDROID_DEFAULT_LOCATOR") |
| 14 | + protected DefaultAndroidWidget singleAndroidWidget; |
| 15 | + |
| 16 | + @AndroidFindBy(uiAutomator = "SOME_ANDROID_DEFAULT_LOCATOR") |
| 17 | + protected List<DefaultAndroidWidget> multipleAndroidWidgets; |
| 18 | + |
| 19 | + /** |
| 20 | + * This class is annotated by {@link AndroidFindBy} |
| 21 | + * This field was added to check that locator is created correctly according to current platform |
| 22 | + * and current automation. |
| 23 | + */ |
| 24 | + protected AnnotatedAndroidWidget singleAnnotatedAndroidWidget; |
| 25 | + |
| 26 | + /** |
| 27 | + * This class is annotated by {@link AndroidFindBy} |
| 28 | + * This field was added to check that locator is created correctly according to current platform |
| 29 | + * and current automation. |
| 30 | + */ |
| 31 | + protected List<AnnotatedAndroidWidget> multipleAnnotatedAndroidWidgets; |
| 32 | + |
| 33 | + /** |
| 34 | + * This class is not annotated by {@link AndroidFindBy} |
| 35 | + * But the superclass is annotated by these annotations. This field was added to check that locator is |
| 36 | + * created correctly according to current platform and current automation. |
| 37 | + */ |
| 38 | + protected ExtendedAndroidWidget singleExtendedAndroidWidget; |
| 39 | + |
| 40 | + /** |
| 41 | + * This class is not annotated by {@link AndroidFindBy} |
| 42 | + * But the superclass is annotated by these annotations. This field was added to check that locator is |
| 43 | + * created correctly according to current platform and current automation. |
| 44 | + */ |
| 45 | + protected List<ExtendedAndroidWidget> multipleExtendedAndroidWidgets; |
| 46 | + |
| 47 | + /** |
| 48 | + * The superclass is annotated by {@link AndroidFindBy} |
| 49 | + * However there is the field which is annotated by this annotations. |
| 50 | + * This field was added to check that locator is |
| 51 | + * created correctly according to current platform and current automation and |
| 52 | + * annotations that mark the field. |
| 53 | + */ |
| 54 | + @AndroidFindBy(uiAutomator = "SOME_ANDROID_EXTERNALLY_DEFINED_LOCATOR") |
| 55 | + protected ExtendedAndroidWidget singleOverriddenAndroidWidget; |
| 56 | + |
| 57 | + /** |
| 58 | + * The superclass is annotated by {@link AndroidFindBy} |
| 59 | + * However there is the field which is annotated by this annotations. |
| 60 | + * This field was added to check that locator is |
| 61 | + * created correctly according to current platform and current automation and |
| 62 | + * annotations that mark the field. |
| 63 | + */ |
| 64 | + @AndroidFindBy(uiAutomator = "SOME_ANDROID_EXTERNALLY_DEFINED_LOCATOR") |
| 65 | + protected List<ExtendedAndroidWidget> multipleOverriddenAndroidWidgets; |
| 66 | +} |
0 commit comments