0

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();

}
}
  • can you add code showing the class where you are getting this error? – Jitendra Jogeshwar Feb 22 at 6:41
  • @JitendraJogeshwar i have updated the class code – manoj Feb 25 at 5:32
  • @manoj: Can you check if you have all dependent jars extracted and put in the right dependency management system. To me, looks like something is missing from the stacktrace. – Kshetra Mohan Prusty Feb 25 at 9:03
  • @manoj Its seems that code and stack trace is different. Can you add code for HomePage class which is shown int the stack trance? – Jitendra Jogeshwar Feb 28 at 11:20
0

Take a look your dev environment. I suffered same issue when the maven project setting include testng library only test scope

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.