Hi!
I have an issue running Appium tests on DF as it gives java.lang.IllegalArgumentException.
I use Appium with JUnit and i use PageFactory to locate the elements
public AndroidScreen(AppiumDriver driver){
this.driver=driver;
initElements(driver);
}
private void initElements (AppiumDriver driver ){
PageFactory.initElements(fieldDecorator(driver), this);
}
public AppiumFieldDecorator fieldDecorator (AppiumDriver driver){
return new AppiumFieldDecorator(driver,20, TimeUnit.SECONDS);
}
error stacktrace was in the appium xml log
<![CDATA[java.lang.IllegalArgumentException
at net.sf.cglib.asm.ClassReader.(Unknown Source)
at net.sf.cglib.asm.ClassReader.(Unknown Source)
at net.sf.cglib.asm.ClassReader.(Unknown Source)
at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)
at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)
at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)
at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:304)
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:55)
at io.appium.java_client.pagefactory.utils.ProxyFactory.getEnhancedProxy(ProxyFactory.java:33)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.proxyForAnElement(AppiumFieldDecorator.java:222)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.access$0(AppiumFieldDecorator.java:220)
at io.appium.java_client.pagefactory.AppiumFieldDecorator$1.proxyForLocator(AppiumFieldDecorator.java:112)
at org.openqa.selenium.support.pagefactory.DefaultFieldDecorator.decorate(DefaultFieldDecorator.java:62)
at io.appium.java_client.pagefactory.AppiumFieldDecorator.decorate(AppiumFieldDecorator.java:160)
at org.openqa.selenium.support.PageFactory.proxyFields(PageFactory.java:113)
at org.openqa.selenium.support.PageFactory.initElements(PageFactory.java:105)
at common.android.AndroidScreen.initElements(AndroidScreen.java:29)
at common.android.AndroidScreen.(AndroidScreen.java:24)
at common.android.Screens.login.LanguageRoadblockScreen.(LanguageRoadblockScreen.java:13)
at common.android.core.MoneseApp.languageRoadblockScreen(MoneseApp.java:30)
at common.android.core.BaseTest.login(BaseTest.java:62)