in the picture instead of xpath i tried it with id as well. i know this xpath is wrong. here is my code.
package com.teo.pageObjects.android;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.pagefactory.AndroidBy;
import io.appium.java_client.pagefactory.AndroidFindBy;
import io.appium.java_client.pagefactory.AppiumFieldDecorator;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
public class loginPage {
private AndroidDriver driver;
public loginPage(AndroidDriver driver) {
this.driver = driver;
PageFactory.initElements(new AppiumFieldDecorator(driver), this.getClass());
}
@AndroidFindBy(id = “com.spectra_systems.jan:id/btnStaging”)
WebElement stagingLink;
public void clickStagingLink(){
stagingLink.click();
}
}