public class Main {
public String RANDOM_ADDRESS = faker.address().streetAddress();
public String ADDRESS() {
return this.RANDOM_ADDRESS;
}
}
public class Service extends Main {
public Service (AppiumDriver driver)
{
super(driver);
}
public Main Main;
String SAVED_ADDRESS = Main.ADDRESS();
public void checkLocationName()
{
this.checkTextOfElementsAreEqual(By.id(COMPLETED_LOCATION_NAME), SAVED_ADDRESS , "Cannot find the Location name", 5);
}
}
CLASS A:
public class Main {
public String RANDOM_ADDRESS = faker.address().streetAddress();
public final String ADDRESS() {
return this.RANDOM_ADDRESS;
}
}
CLASS B:
public class Service extends Main {
public Service (AppiumDriver driver)
{
super(driver);
}
public void checkLocationName()
{
String SAVED_ADDRESS = this.ADDRESS();
this.checkTextOfElementsAreEqual(By.id(COMPLETED_LOCATION_NAME), SAVED_ADDRESS , "Cannot find the Location name", 5);
}
}