Skip to content

Instantly share code, notes, and snippets.

@leomenezessz
Last active March 9, 2018 14:21
Show Gist options
  • Save leomenezessz/9560986e4d9d6bc0cb88d2f277669b65 to your computer and use it in GitHub Desktop.
Save leomenezessz/9560986e4d9d6bc0cb88d2f277669b65 to your computer and use it in GitHub Desktop.
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")
@iOSFindBy(accessibility = "apple-sum-button")
public RemoteWebElement buttonSum;
@AndroidFindBy(id = "android_result_text")
@iOSFindBy(accessibility = "apple_result_text")
private RemoteWebElement resultText;
@AndroidFindBy(id = "android_field_first_number")
@iOSFindBy(accessibility = "apple_first_input")
private RemoteWebElement inputFirstNumber;
@AndroidFindBy(id = "android_field_second_number")
@iOSFindBy(accessibility = "apple_second_input")
private RemoteWebElement inputSecondNumber;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment