diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/AbstractStubWebDriver.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/AbstractStubWebDriver.java index 927fc2b25..d5c5af560 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/AbstractStubWebDriver.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/AbstractStubWebDriver.java @@ -264,6 +264,7 @@ public String getAutomationName() { return APPIUM; } + @Override public boolean isBrowser() { return true; } diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ExtendedWidgetTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ExtendedWidgetTest.java index 0d153fc3b..2523c017b 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ExtendedWidgetTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ExtendedWidgetTest.java @@ -26,8 +26,9 @@ protected ExtendedWidgetTest(ExtendedApp app, WebDriver driver) { @Test public abstract void checkCaseWhenBothWidgetFieldAndClassHaveDelaredAnnotations(); - protected static void testLogigByDefault(DefaultStubWidget single, List multiple, By rootLocator, - By subLocator) { + protected static void checkThatLocatorsAreCreatedCorrectly(DefaultStubWidget single, + List multiple, By rootLocator, + By subLocator) { assertThat(single.toString(), containsString(rootLocator.toString())); assertThat(multiple.stream().map(DefaultStubWidget::toString).collect(toList()), diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/WidgetTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/WidgetTest.java index 20a5af0d3..6ef019438 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/WidgetTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/WidgetTest.java @@ -21,5 +21,5 @@ protected WidgetTest(AbstractApp app, WebDriver driver) { } @Test - public abstract void commonTestCase(); + public abstract void checkThatWidgetsAreCreatedCorrectly(); } diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidApp.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidApp.java index 7b168e078..419bd4fba 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidApp.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidApp.java @@ -22,18 +22,52 @@ public class AndroidApp implements ExtendedApp { @SelendroidFindBy(linkText = "SOME_SELENDROID_DEFAULT_LOCATOR") private List multipleAndroidWidgets; + /** + * This class is annotated by {@link AndroidFindBy} and @{@link SelendroidFindBy}. + * This field was added to check that locator is created correctly according to current platform + * and current automation. + */ private AnnotatedAndroidWidget singleAnnotatedAndroidWidget; + /** + * This class is annotated by {@link AndroidFindBy} and @{@link SelendroidFindBy}. + * This field was added to check that locator is created correctly according to current platform + * and current automation. + */ private List multipleAnnotatedAndroidWidgets; + /** + * This class is not annotated by {@link AndroidFindBy} and {@link SelendroidFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform and current automation. + */ private ExtendedAndroidWidget singleExtendedAndroidWidget; + /** + * This class is not annotated by {@link AndroidFindBy} and {@link SelendroidFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform and current automation. + */ private List multipleExtendedAndroidWidgets; + /** + * The superclass is annotated by {@link AndroidFindBy} and {@link SelendroidFindBy}. + * However there is the field which is annotated by this annotations. + * This field was added to check that locator is + * created correctly according to current platform and current automation and + * annotations that mark the field. + */ @AndroidFindBy(uiAutomator = "SOME_ANDROID_EXTERNALLY_DEFINED_LOCATOR") @SelendroidFindBy(linkText = "SOME_SELENDROID_EXTERNALLY_DEFINED_LOCATOR") private ExtendedAndroidWidget singleOverriddenAndroidWidget; + /** + * The superclass is annotated by {@link AndroidFindBy} and {@link SelendroidFindBy}. + * However there is the field which is annotated by this annotations. + * This field was added to check that locator is + * created correctly according to current platform and current automation and + * annotations that mark the field. + */ @AndroidFindBy(uiAutomator = "SOME_ANDROID_EXTERNALLY_DEFINED_LOCATOR") @SelendroidFindBy(linkText = "SOME_SELENDROID_EXTERNALLY_DEFINED_LOCATOR") private List multipleOverriddenAndroidWidgets; diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidWidgetTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidWidgetTest.java index ec5c00946..7985e67c4 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidWidgetTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/AndroidWidgetTest.java @@ -17,26 +17,28 @@ public AndroidWidgetTest() { } @Override - public void commonTestCase() { - testLogigByDefault(app.getWidget(), app.getWidgets(), + public void checkThatWidgetsAreCreatedCorrectly() { + checkThatLocatorsAreCreatedCorrectly(app.getWidget(), app.getWidgets(), AndroidUIAutomator(ANDROID_DEFAULT_WIDGET_LOCATOR), AndroidUIAutomator(ANDROID_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasDeclaredLocatorAnnotation() { - testLogigByDefault(((ExtendedApp) app).getAnnotatedWidget(), ((ExtendedApp) app).getAnnotatedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getAnnotatedWidget(), + ((ExtendedApp) app).getAnnotatedWidgets(), AndroidUIAutomator(ANDROID_ROOT_WIDGET_LOCATOR), AndroidUIAutomator(ANDROID_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasNoDeclaredAnnotationButItHasSuperclass() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidget(), ((ExtendedApp) app).getExtendedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidget(), + ((ExtendedApp) app).getExtendedWidgets(), AndroidUIAutomator(ANDROID_ROOT_WIDGET_LOCATOR), AndroidUIAutomator(ANDROID_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenBothWidgetFieldAndClassHaveDelaredAnnotations() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), ((ExtendedApp) app).getExtendedWidgetsWithOverriddenLocators(), AndroidUIAutomator(ANDROID_EXTERNALLY_DEFINED_WIDGET_LOCATOR), AndroidUIAutomator(ANDROID_SUB_WIDGET_LOCATOR)); diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/SelendroidWidgetTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/SelendroidWidgetTest.java index 710aac0f8..0166b4f16 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/SelendroidWidgetTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/android/SelendroidWidgetTest.java @@ -16,26 +16,28 @@ public SelendroidWidgetTest() { } @Override - public void commonTestCase() { - testLogigByDefault(app.getWidget(), app.getWidgets(), + public void checkThatWidgetsAreCreatedCorrectly() { + checkThatLocatorsAreCreatedCorrectly(app.getWidget(), app.getWidgets(), linkText(ANDROID_SELENDROID_WIDGET_LOCATOR), linkText(SELENDROID_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasDeclaredLocatorAnnotation() { - testLogigByDefault(((ExtendedApp) app).getAnnotatedWidget(), ((ExtendedApp) app).getAnnotatedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getAnnotatedWidget(), + ((ExtendedApp) app).getAnnotatedWidgets(), linkText(SELENDROID_ROOT_WIDGET_LOCATOR), linkText(SELENDROID_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasNoDeclaredAnnotationButItHasSuperclass() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidget(), ((ExtendedApp) app).getExtendedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidget(), + ((ExtendedApp) app).getExtendedWidgets(), linkText(SELENDROID_ROOT_WIDGET_LOCATOR), linkText(SELENDROID_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenBothWidgetFieldAndClassHaveDelaredAnnotations() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), ((ExtendedApp) app).getExtendedWidgetsWithOverriddenLocators(), linkText(SELENDROID_EXTERNALLY_DEFINED_WIDGET_LOCATOR), linkText(SELENDROID_SUB_WIDGET_LOCATOR)); } diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/combined/CombinedAppTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/combined/CombinedAppTest.java index 510716b70..c74a0847e 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/combined/CombinedAppTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/combined/CombinedAppTest.java @@ -67,7 +67,7 @@ public CombinedAppTest(AbstractApp app, WebDriver driver, Class widgetClas } @Override - public void commonTestCase() { + public void checkThatWidgetsAreCreatedCorrectly() { assertThat("Excpected widget class was " + widgetClass.getName(), app.getWidget().getSubWidget().getSelfReference().getClass(), equalTo(widgetClass)); diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosApp.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosApp.java index 64faa2bd7..8fbc1643a 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosApp.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosApp.java @@ -22,18 +22,58 @@ public class IosApp implements ExtendedApp { @iOSXCUITFindBy(iOSNsPredicate = "SOME_XCUIT_DEFAULT_LOCATOR") private List multipleIosWidgets; + /** + * This class is annotated by {@link io.appium.java_client.pagefactory.iOSFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * This field was added to check that locator is created correctly according to current platform + * and current automation. + */ private AnnotatedIosWidget singleAnnotatedIosWidget; + /** + * This class is annotated by {@link io.appium.java_client.pagefactory.iOSFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * This field was added to check that locator is created correctly according to current platform + * and current automation. + */ private List multipleIosIosWidgets; + /** + * This class is not annotated by {@link io.appium.java_client.pagefactory.iOSFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform and current automation. + */ private ExtendedIosWidget singleExtendedIosWidget; + /** + * This class is not annotated by {@link io.appium.java_client.pagefactory.iOSFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform and current automation. + */ private List multipleExtendedIosWidgets; + /** + * The superclass is annotated by {@link io.appium.java_client.pagefactory.iOSFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * However there is the field which is annotated by this annotations. + * This field was added to check that locator is + * created correctly according to current platform and current automation and + * annotations that mark the field. + */ @iOSFindBy(uiAutomator = "IOS_EXTERNALLY_DEFINED_WIDGET_LOCATOR") @iOSXCUITFindBy(iOSNsPredicate = "SOME_XCUIT_EXTERNALLY_DEFINED_LOCATOR") private ExtendedIosWidget singleOverriddenIosWidget; + /** + * The superclass is annotated by {@link io.appium.java_client.pagefactory.iOSFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * However there is the field which is annotated by this annotations. + * This field was added to check that locator is + * created correctly according to current platform and current automation and + * annotations that mark the field. + */ @iOSFindBy(uiAutomator = "IOS_EXTERNALLY_DEFINED_WIDGET_LOCATOR") @iOSXCUITFindBy(iOSNsPredicate = "SOME_XCUIT_EXTERNALLY_DEFINED_LOCATOR") private List multipleOverriddenIosWidgets; diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosWidgetTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosWidgetTest.java index f725e002c..ad84fef59 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosWidgetTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/IosWidgetTest.java @@ -17,26 +17,28 @@ public IosWidgetTest() { } @Override - public void commonTestCase() { - testLogigByDefault(app.getWidget(), app.getWidgets(), + public void checkThatWidgetsAreCreatedCorrectly() { + checkThatLocatorsAreCreatedCorrectly(app.getWidget(), app.getWidgets(), IosUIAutomation(IOS_DEFAULT_WIDGET_LOCATOR), IosUIAutomation(IOS_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasDeclaredLocatorAnnotation() { - testLogigByDefault(((ExtendedApp) app).getAnnotatedWidget(), ((ExtendedApp) app).getAnnotatedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getAnnotatedWidget(), + ((ExtendedApp) app).getAnnotatedWidgets(), IosUIAutomation(IOS_ROOT_WIDGET_LOCATOR), IosUIAutomation(IOS_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasNoDeclaredAnnotationButItHasSuperclass() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidget(), ((ExtendedApp) app).getExtendedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidget(), + ((ExtendedApp) app).getExtendedWidgets(), IosUIAutomation(IOS_ROOT_WIDGET_LOCATOR), IosUIAutomation(IOS_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenBothWidgetFieldAndClassHaveDelaredAnnotations() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), ((ExtendedApp) app).getExtendedWidgetsWithOverriddenLocators(), IosUIAutomation(IOS_EXTERNALLY_DEFINED_WIDGET_LOCATOR), IosUIAutomation(IOS_SUB_WIDGET_LOCATOR)); } diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/XCUITWidgetTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/XCUITWidgetTest.java index 322d9cae2..c55365610 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/XCUITWidgetTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/ios/XCUITWidgetTest.java @@ -17,26 +17,28 @@ public XCUITWidgetTest() { } @Override - public void commonTestCase() { - testLogigByDefault(app.getWidget(), app.getWidgets(), + public void checkThatWidgetsAreCreatedCorrectly() { + checkThatLocatorsAreCreatedCorrectly(app.getWidget(), app.getWidgets(), iOSNsPredicateString(IOS_XCUIT_WIDGET_LOCATOR), iOSNsPredicateString(XCUIT_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasDeclaredLocatorAnnotation() { - testLogigByDefault(((ExtendedApp) app).getAnnotatedWidget(), ((ExtendedApp) app).getAnnotatedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getAnnotatedWidget(), + ((ExtendedApp) app).getAnnotatedWidgets(), iOSNsPredicateString(XCUIT_ROOT_WIDGET_LOCATOR), iOSNsPredicateString(XCUIT_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasNoDeclaredAnnotationButItHasSuperclass() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidget(), ((ExtendedApp) app).getExtendedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidget(), + ((ExtendedApp) app).getExtendedWidgets(), iOSNsPredicateString(XCUIT_ROOT_WIDGET_LOCATOR), iOSNsPredicateString(XCUIT_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenBothWidgetFieldAndClassHaveDelaredAnnotations() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), ((ExtendedApp) app).getExtendedWidgetsWithOverriddenLocators(), iOSNsPredicateString(XCUIT_EXTERNALLY_DEFINED_WIDGET_LOCATOR), iOSNsPredicateString(XCUIT_SUB_WIDGET_LOCATOR)); diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsApp.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsApp.java index 9aae2cd72..4d264820c 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsApp.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsApp.java @@ -20,18 +20,64 @@ public class WindowsApp implements ExtendedApp { @iOSXCUITFindBy(iOSNsPredicate = "SOME_XCUIT_DEFAULT_LOCATOR") private List multipleIosWidgets; + /** + * This class is annotated by {@link WindowsFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * This field was added to check that locator is created correctly according to current platform. + * It is expected that the root element and sub-elements are found using + * {@link io.appium.java_client.MobileBy#windowsAutomation(String)} + */ private AnnotatedWindowsWidget singleAnnotatedIosWidget; + /** + * This class is annotated by {@link WindowsFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * This field was added to check that locator is created correctly according to current platform. + * It is expected that the root element and sub-elements are found using + * {@link io.appium.java_client.MobileBy#windowsAutomation(String)}. + */ private List multipleIosIosWidgets; + /** + * This class is not annotated by {@link WindowsFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform. + * It is expected that the root element and sub-elements are found using + * {@link io.appium.java_client.MobileBy#windowsAutomation(String)}. + */ private ExtendedWindowsWidget singleExtendedIosWidget; + /** + * This class is not annotated by {@link WindowsFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform. + * It is expected that the root element and sub-elements are found using + * {@link io.appium.java_client.MobileBy#windowsAutomation(String)}. + */ private List multipleExtendedIosWidgets; + /** + * This class is not annotated by {@link WindowsFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform. + * It is expected that the root element and sub-elements are found using + * {@link io.appium.java_client.MobileBy#windowsAutomation(String)}. + */ @WindowsFindBy(windowsAutomation = "WINDOWS_EXTERNALLY_DEFINED_WIDGET_LOCATOR") @iOSXCUITFindBy(iOSNsPredicate = "SOME_XCUIT_EXTERNALLY_DEFINED_LOCATOR") private ExtendedWindowsWidget singleOverriddenIosWidget; + /** + * This class is not annotated by {@link WindowsFindBy} and + * {@link io.appium.java_client.pagefactory.iOSXCUITFindBy}. + * But the superclass is annotated by these annotations. This field was added to check that locator is + * created correctly according to current platform. + * It is expected that the root element and sub-elements are found using + * {@link io.appium.java_client.MobileBy#windowsAutomation(String)}. + */ @WindowsFindBy(windowsAutomation = "WINDOWS_EXTERNALLY_DEFINED_WIDGET_LOCATOR") @iOSXCUITFindBy(iOSNsPredicate = "SOME_XCUIT_EXTERNALLY_DEFINED_LOCATOR") private List multipleOverriddenIosWidgets; diff --git a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsWidgetTest.java b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsWidgetTest.java index 7f6ab4fea..5358b29dc 100644 --- a/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsWidgetTest.java +++ b/src/test/java/io/appium/java_client/pagefactory_tests/widget/tests/windows/WindowsWidgetTest.java @@ -17,26 +17,28 @@ public WindowsWidgetTest() { } @Override - public void commonTestCase() { - testLogigByDefault(app.getWidget(), app.getWidgets(), + public void checkThatWidgetsAreCreatedCorrectly() { + checkThatLocatorsAreCreatedCorrectly(app.getWidget(), app.getWidgets(), windowsAutomation(WINDOWS_DEFAULT_WIDGET_LOCATOR), windowsAutomation(WINDOWS_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasDeclaredLocatorAnnotation() { - testLogigByDefault(((ExtendedApp) app).getAnnotatedWidget(), ((ExtendedApp) app).getAnnotatedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getAnnotatedWidget(), + ((ExtendedApp) app).getAnnotatedWidgets(), windowsAutomation(WINDOWS_ROOT_WIDGET_LOCATOR), windowsAutomation(WINDOWS_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenWidgetClassHasNoDeclaredAnnotationButItHasSuperclass() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidget(), ((ExtendedApp) app).getExtendedWidgets(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidget(), + ((ExtendedApp) app).getExtendedWidgets(), windowsAutomation(WINDOWS_ROOT_WIDGET_LOCATOR), windowsAutomation(WINDOWS_SUB_WIDGET_LOCATOR)); } @Override public void checkCaseWhenBothWidgetFieldAndClassHaveDelaredAnnotations() { - testLogigByDefault(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), + checkThatLocatorsAreCreatedCorrectly(((ExtendedApp) app).getExtendedWidgetWithOverriddenLocators(), ((ExtendedApp) app).getExtendedWidgetsWithOverriddenLocators(), windowsAutomation(WINDOWS_EXTERNALLY_DEFINED_WIDGET_LOCATOR), windowsAutomation(WINDOWS_SUB_WIDGET_LOCATOR));