Skip to content

Commit 402ac3d

Browse files
committed
Adds default element test case to verify elements are not initialized as widgets with AppiumFieldDecorator
1 parent 116d710 commit 402ac3d

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/test/java/io/appium/java_client/pagefactory_tests/DesktopBrowserCompatibilityTest.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@
1818

1919
import io.appium.java_client.TestUtils;
2020
import io.appium.java_client.android.AndroidDriver;
21-
import io.appium.java_client.pagefactory.AndroidFindBy;
22-
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
23-
import io.appium.java_client.pagefactory.HowToUseLocators;
24-
import io.appium.java_client.pagefactory.iOSXCUITFindBy;
21+
import io.appium.java_client.pagefactory.*;
2522
import org.junit.jupiter.api.BeforeAll;
2623
import org.junit.jupiter.api.Test;
2724
import org.openqa.selenium.WebDriver;
@@ -37,8 +34,7 @@
3734
import static io.appium.java_client.pagefactory.LocatorGroupStrategy.ALL_POSSIBLE;
3835
import static io.github.bonigarcia.wdm.WebDriverManager.chromedriver;
3936
import static java.time.Duration.ofSeconds;
40-
import static org.junit.jupiter.api.Assertions.assertNotEquals;
41-
import static org.junit.jupiter.api.Assertions.assertNull;
37+
import static org.junit.jupiter.api.Assertions.*;
4238

4339
public class DesktopBrowserCompatibilityTest {
4440
private static final String HELLO_APPIUM_HTML =
@@ -69,6 +65,7 @@ public class DesktopBrowserCompatibilityTest {
6965
assertNotEquals(0, main.size());
7066
assertNull(trap1);
7167
assertNull(trap2);
68+
foundLinks.forEach(element -> assertFalse(Widget.class.isAssignableFrom(element.getClass())));
7269
} finally {
7370
driver.quit();
7471
}

0 commit comments

Comments
 (0)