I have written a code to launch my app and click on the element, the app is launching but after launching when it is trying to click, I am getting an error which I am not able to understand why.
Error
Feb 19, 2019 2:54:42 PM io.appium.java_client.remote.AppiumCommandExecutor$1 lambda$0
INFO: Detected dialect: W3C
Exception in thread “main” java.lang.NoClassDefFoundError: net/sf/cglib/proxy/MethodInterceptor
at pageobjects.HomePage.(HomePage.java:12)
at pages.SignUp.main(SignUp.java:22)
Caused by: java.lang.ClassNotFoundException: net.sf.cglib.proxy.MethodInterceptor
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
… 2 more
This is the class code
package pages;
import java.net.MalformedURLException;
import java.util.concurrent.TimeUnit;
import io.appium.java_client.android.AndroidDriver;
import io.appium.java_client.android.AndroidElement;
import page_objects.Home_page;
public class SignUp extends MobileCap
{
public static void main(String[] args) throws MalformedURLException
{
// TODO Auto-generated method stub
AndroidDriver<AndroidElement> driver = Capabilities();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
Home_page h = new Home_page(driver);
h.SignUp.click();
}
}
Source: Read More