java-client icon indicating copy to clipboard operation
java-client copied to clipboard

Pagefactory not initialise the @AndroidFindby and iOSFindBy but @Findby is work fine.

Open saravanan060694 opened this issue 2 years ago • 1 comments

Description

while initialise the AppiumDriver<MobileElement> through pagefactory its not able to initialise the @AndroidFindby and iOSFindBy but @Findby is work fine.

Environment

  • Java client build version or git revision if you use some snapshot: java client 7.3
  • Appium server version or git revision if you use some snapshot: 1.22.3
  • Desktop OS/version used to run Appium if necessary: Mac 13.4.1 (22F82)
  • Node.js version (unless using Appium.app|exe) or Appium CLI or Appium.app|exe: node V18.16.0
  • Mobile platform/version under test: Android/12 and 13, Ios/16.4
  • Real device or emulator/simulator: Real devices and emulator/simulator

Details

Please provide more details, if necessary.

Code To Reproduce Issue

LoginPageElements_Mobile_DTT LoginPageElements_Mobile = new LoginPageElements_Mobile_DTT();

public LoginPageMethods_Mobile_DTT(RemoteWebDriver driver) {
	super((AppiumDriver<MobileElement>) driver);
	PageFactory.initElements(new AppiumFieldDecorator(driver, Duration.ofSeconds(1)), LoginPageElements_Mobile);
}
    
    //on the page class 
    @AndroidFindBy(xpath = "//*[contains(@text,'Already have an account? Login')]")
public MobileElement mrp_lbl;

Error: java.lang.RuntimeException: java.lang.NoSuchMethodException: jdk.proxy2.$Proxy15.proxyClassLookup() java.lang.RuntimeException: java.lang.NoSuchMethodException: at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:105) at android.appium.DTT.login.LoginPageMethods_Mobile_DTT.(LoginPageMethods_Mobile_DTT.java:119)

Exception Stacktraces

Please create a gist with the pasted stacktrace of the exception thrown by java.

Link To Appium Logs

gist:5233ce62b82dea619b3aa2bd39a84398

saravanan060694 avatar Jul 06 '23 09:07 saravanan060694

Please try to use the latest version of the client

valfirst avatar Jul 09 '23 20:07 valfirst