1) move all to maven with using testNG XML files and it will be fine
2) move BeforeSuite + AfterSuite to some BaseTest class
3) before "homeScreen.verifyHeader();" should be "homeScreen = new HomeScreen(driver);
4) update:
public void selectTextButton(){
WebDriverWait wait = new WebDriverWait(driver, 30);
wait.until(ExpectedConditions.elementToBeClickable(this.textButton));
System.out.println("HOME_SCREEN_PAGE: Selecting [TEXT] button.\n");
this.textButton.click();
}
// - >
public boolean selectTextButton(){
System.out.println(" selectTextButton()");
return tapElement(switchAccountIcon);
}
// tapElement create in BasePage and extend it with every other page
public boolean tapElement(MobileElement element) {
try {
new TouchAction((MobileDriver) driver).press(element).waitAction(70).release().perform();
return true;
} catch (Exception e) {
return false;
}
}
5) start using asserts
like:
assertTrue("'Some Element' icon NOT loaded", somePage.tapSomeElement());