I want to be able to use multiple time same Method in my mobile automation suite. Means that each time i just calling Method and updating only "elementName" ( AndroidElement).

I tried:

```
 public void waitForScreenToLoad(AndroidElement elementName){
        (new WebDriverWait(driver,30)).until(ExpectedConditions.presenceOfElementLocated(By.id(elementName.getId())));
    }

```

In my test i will call it this way

```
MessageCenterScreen message = new MessageCenterScreen(driver);

base.waitForScreenToLoad(message.addCardButton);

```

But my test is failing because it cannot find an element which exists.

I use Page Factory model to locate an elements

```
   @FindBy(id = "widget_loading_fab_button")
        public AndroidElement addCardButton;

```

This way it works perfectly, but the problem is : **I Dont want to duplicate my method all the times.**

```
public void waitForCardManagementScreenToLoad() {
        (new WebDriverWait(driver, 30)).until(ExpectedConditions.presenceOfElementLocated(By.id("widget_loading_fab_button")));
    } 

```