Flutter appium driver is automation tool with java implementation.
Add maven dependency to pom.xml
<dependency>
<groupId>io.github.ashwithpoojary98</groupId>
<artifactId>appium_flutterfinder_java</artifactId>
<version>1.0.3</version>
</dependency>
https://mvnrepository.com/artifact/io.github.ashwithpoojary98/appium_flutterfinder_java
import io.appium.java_client.AppiumDriver;
public class FlutterFinderExampleTest {
RemoteWebDriver driver;
@BeforeMethod
public void openApp() throws MalformedURLException {
DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability("deviceName", "emulator-5554");
capabilities.setCapability("platformName", "Android");
capabilities.setCapability("noReset", true);
capabilities.setCapability("app", "");
capabilities.setCapability("automationName", "Flutter");
driver = new AppiumDriver(new URL("http://0.0.0.0:4723/wd/hub"), capabilities);
driver.manage().timeouts().implicitlyWait(Duration.ofSeconds(30));
}
@Test
public void appiumFlutterTest() {
FlutterFinder finder = new FlutterFinder(driver);
WebElement element = finder.byValueKey("increment");
element.click();
}
@AfterMethod
public void tearDown() {
if (driver != null) {
driver.quit();
}
}
}
https://dev.to/ashwithpoojary98/automating-flutter-app-using-flutter-appium-driver-1cmb
- byValueKey(String key)
- byValueKey(int key)
- byToolTip(String toolTipText)
- byType(String type)
- byText(String input)
- byAncestor(FlutterElement of, FlutterElement matching, boolean matchRoot, boolean firstMatchOnly)
- byDescendant(FlutterElement of, FlutterElement matching, boolean matchRoot, boolean firstMatchOnly)
- bySemanticsLabel(String label)
- bySemanticsLabel(Pattern label)
https://api.flutter.dev/flutter/flutter_test/CommonFinders-class.html
https://github.com/appium-userland/appium-flutter-driver
appium_flutterfinder_java is released under
Copyright (c) 2023 appium_flutterfinder_java