This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>io.appium</groupId> | |
<artifactId>java-client</artifactId> | |
<version>4.1.2</version> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-surefire-plugin</artifactId> | |
<version>2.19.1</version> | |
</plugin> | |
</plugins> | |
</build> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupId>junit</groupId> | |
<artifactId>junit</artifactId> | |
<version>4.7</version> | |
<scope>test</scope> | |
</dependency> | |
</dependencies> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CalculatorScreen { | |
private AppiumDriver<MobileElement> driver; | |
public CalculatorScreen(AppiumDriver<MobileElement> driver) { | |
PageFactory.initElements( new AppiumFieldDecorator(driver), this); | |
this.driver = driver; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CalculatorScreen { | |
private AppiumDriver<MobileElement> driver; | |
public CalculatorScreen(AppiumDriver<MobileElement> driver) { | |
PageFactory.initElements( new AppiumFieldDecorator(driver), this); | |
this.driver = driver; | |
} | |
@AndroidFindBy(id = "android_button_sum") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public CalculatorScreen fillFirstNumber(String number) { | |
inputFirstNumber.click(); | |
inputFirstNumber.clear(); | |
driver.getKeyboard().sendKeys(number); | |
return this; | |
} | |
public CalculatorScreen fillSecondNumber(String number) { | |
inputSecondNumber.click(); | |
inputSecondNumber.clear(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestAndroidCalculator { | |
private static CalculatorScreen calculatorScreen; | |
private static AppiumDriver<MobileElement> appiumDriver; | |
@BeforeClass | |
public static void setup() throws MalformedURLException { | |
DesiredCapabilities capabilities = new DesiredCapabilities(); | |
capabilities.setCapability("app",new File("apps/app-android-calculator.apk")); | |
capabilities.setCapability("platformName","Android" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class TestIosCalculator { | |
private static CalculatorScreen calculatorScreen; | |
private static AppiumDriver<MobileElement> appiumDriver; | |
@BeforeClass | |
public static void setup() throws MalformedURLException { | |
DesiredCapabilities capabilities = new DesiredCapabilities(); | |
capabilities.setCapability("app",new File("apps/SimpleCalculator.app")); | |
capabilities.setCapability("plataform", "MAC" ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<properties> | |
<maven.compiler.source>1.8</maven.compiler.source> | |
<maven.compiler.target>1.8</maven.compiler.target> | |
</properties> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<source>1.8</source> | |
<target>1.8</target> | |
<parallel>classes</parallel> | |
<threadCount>2</threadCount> | |
</configuration> |
OlderNewer