WebDriverException.addInfo

322 views
Skip to first unread message

Federico Lenzi

unread,
Nov 19, 2013, 2:53:33 PM11/19/13
to seleniu...@googlegroups.com
I have some UI tests using testng and selenium. I can run them locally with no problem. 
The problem comes when I run them in a jenkins with the xvnc plugin: 

Error Message

org.openqa.selenium.WebDriverException.addInfo(Ljava/lang/String;Ljava/lang/String;)V

Stacktrace

java.lang.NoSuchMethodError: org.openqa.selenium.WebDriverException.addInfo(Ljava/lang/String;Ljava/lang/String;)V
	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:556)
	at org.openqa.selenium.remote.RemoteWebDriver.get(RemoteWebDriver.java:276)
	at com.mypackage.myclass.setUp(MainTest.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:543)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:212)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:138)
	at org.testng.internal.TestMethodWorker.invokeBeforeClassMethods(TestMethodWorker.java:175)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:107)
	at org.testng.TestRunner.privateRun(TestRunner.java:758)
	at org.testng.TestRunner.run(TestRunner.java:613)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:87)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1137)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1062)
	at org.testng.TestNG.run(TestNG.java:974)
	at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:91)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeMulti(TestNGDirectoryTestSuite.java:204)
	at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:107)
	at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:113)
	at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
	at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

Krishnan Mahadevan

unread,
Nov 20, 2013, 5:58:14 AM11/20/13
to Selenium Users
Looks like your classpath has gotten messed up for sure.
Is yours a maven project ?  If its a Maven project you could consider running a mvn dependency:tree and check what is the version of selenium you are resolving to.


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f56fcd57-85d3-4364-841c-ccf7775f2276%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Federico Lenzi

unread,
Nov 20, 2013, 8:40:12 AM11/20/13
to seleniu...@googlegroups.com
Hi Krishnan,
Thanks for the response.

This is the mvn dependency:tree with the selenium dependencies:

...
[INFO] +- org.seleniumhq.selenium:selenium:jar:2.0b1:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-htmlunit-driver:jar:2.0b1:compile
[INFO] |  |  +- org.seleniumhq.selenium:selenium-common:jar:2.0b1:compile
[INFO] |  |  \- net.sourceforge.htmlunit:htmlunit:jar:2.8:compile
[INFO] |  |     +- xalan:xalan:jar:2.7.1:compile
[INFO] |  |     |  \- xalan:serializer:jar:2.7.1:compile
[INFO] |  |     +- org.apache.httpcomponents:httpmime:jar:4.0.1:compile
[INFO] |  |     |  \- org.apache.james:apache-mime4j:jar:0.6:compile
[INFO] |  |     +- net.sourceforge.htmlunit:htmlunit-core-js:jar:2.8:compile
[INFO] |  |     +- net.sourceforge.nekohtml:nekohtml:jar:1.9.14:compile
[INFO] |  |     \- net.sourceforge.cssparser:cssparser:jar:0.9.5:compile
[INFO] |  |        \- org.w3c.css:sac:jar:1.3:compile
[INFO] |  \- org.seleniumhq.selenium:selenium-support:jar:2.0b1:compile
[INFO] |     +- com.google.guava:guava:jar:r07:compile
[INFO] |     \- org.hamcrest:hamcrest-all:jar:1.1:compile
[INFO] +- org.seleniumhq.selenium:selenium-firefox-driver:jar:2.35.0:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-remote-driver:jar:2.35.0:compile
[INFO] |  |  +- cglib:cglib-nodep:jar:2.1_3:compile
[INFO] |  |  +- org.json:json:jar:20080701:compile
[INFO] |  |  \- org.seleniumhq.selenium:selenium-api:jar:2.35.0:compile
[INFO] |  \- org.apache.commons:commons-exec:jar:1.1:compile
[INFO] +- org.seleniumhq.selenium:selenium-chrome-driver:jar:2.35.0:compile
[INFO] +- org.seleniumhq.selenium:selenium-ie-driver:jar:2.35.0:compile
[INFO] |  +- net.java.dev.jna:jna:jar:3.4.0:compile
[INFO] |  \- net.java.dev.jna:platform:jar:3.4.0:compile
[INFO] +- org.seleniumhq.selenium:selenium-iphone-driver:jar:2.35.0:compile
[INFO] +- org.seleniumhq.selenium:selenium-java:jar:2.35.0:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-android-driver:jar:2.35.0:compile
[INFO] |  +- org.seleniumhq.selenium:selenium-safari-driver:jar:2.35.0:compile
[INFO] |  \- org.webbitserver:webbit:jar:0.4.14:compile
[INFO] |     \- io.netty:netty:jar:3.5.2.Final:compile
...

Federico Lenzi

unread,
Nov 20, 2013, 10:59:31 AM11/20/13
to seleniu...@googlegroups.com
The problem was solved removing a beta dependency
-    <dependency>
-      <groupId>org.seleniumhq.selenium</groupId>
-      <artifactId>selenium</artifactId>
-      <version>2.0b1</version>
-    </dependency>
which was added by mistake.

Thanks Krishnan for the response

Krishnan Mahadevan

unread,
Nov 21, 2013, 3:56:27 AM11/21/13
to Selenium Users
I was about to respond back asking you to get rid of 2.0b1 [ its a real old version ] :)

Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"
My Scribblings @ http://wakened-cognition.blogspot.com/


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages