WebDriver +TestNg+Ant throwing NoClassDefFoundError

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

WebDriver +TestNg+Ant throwing NoClassDefFoundError

Pooja
I was successfully running testng test from ANT build in Selenium RC environment.
But while  running the same with WebDriver
throwing exception

compile:
    [javac] Compiling 2 source files to D:\Workspace\KeyWordDriven\bin
exec:
   [testng] [Parser] Running:
   [testng]   D:\PaceNet\Workspace\KeyWordDriven\src\com\test\mySuit.xml
   [testng] ===============================================
   [testng] Pacenet_TEST
   [testng] Total tests run: 0, Failures: 0, Skips: 0
   [testng] ===============================================
   [testng] Exception in thread "main" java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver
   [testng]     at java.lang.Class.getDeclaredMethods0(Native Method)
   [testng]     at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
   [testng]     at java.lang.Class.privateGetPublicMethods(Unknown Source)

What I understood is, I need to configure web-driver dependencies in ANT as well, and that is what I did , but still it doesn't work.

And similar kind of one more issue happens if I use EmailableReporter2 class.

D:\Workspace\KeyWordDriven\src\com\\util\GenerateReport.java:38: error: cannot find symbol
    [javac] import org.testng.reporters.EmailableReporter2;
    [javac]                            ^
    [javac]   symbol:   class EmailableReporter2
    [javac]   location: package org.testng.reporters


I know It is more related to webdriver and ANT, but If anybody faced similar problem, please share the solution, or tell me the other forum link where I can find the same.

Thanks & Regards,
`pooja

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: WebDriver +TestNg+Ant throwing NoClassDefFoundError

bapi das
Hi Puja,

Though I din face the issue but from your  statement I guess there must be some jar issue. So my question is have you included the required jar for webDriver and mentioned the same in your project classpath?

I am also working on the same TestNG+Selenium Webdriver framework but din face this type of issues.

Let me know if you have any concerns.

Regards,
Bapi

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.