Not able to resolve org/openqa/selenium/firefox/FirefoxDriver - selenium

I am using selenium RC to run our test cases, but while running it is throwing error as
below
java.lang.NoClassDefFoundError:
org/openqa/selenium/firefox/FirefoxDriver
Please help me as I am stuck with this problem from past 1 week

Check you downloaded the selenium server with dependencies included, and check whether org/openqa/selenium/firefox/FirefoxDriver is in your classpath

Related

Test Failing after upgrade from 0.2.7 to 0.6.1

After upgrading from 0.2.7 to 0.6.1, I am seeing a test failure when running from gradle.
The failing test is a simple:
And match response.dispositionInstructions == "Disposition Instructions"
When I run from intellij, the test passes.
Running from gradle, the following is logged:
15:11:22.840 [DEBUG] [TestEventLogger] com.intuit.karate.exception.KarateException: path: $.dispositionInstructions, actual: '{"dispositionInstructions":"Disposition Instructions", rest of document omitted}’ , expected: 'Disposition Instructions', reason: not equal
Not sure if it is relevant, but the JSON document is over 94k long.
However, if I paste the document (from the log) into a JSON validator (jsonlint.com), it shows it as being valid.
I am keen to exploit the new functionality and this is the only issue blocking me.
Any suggestions as to why this is failing on 0.6.1?
Dev of Karate here. Thanks for the clear explanation of the issue !
My guess is that this is related to this particular issue: https://github.com/intuit/karate/issues/144
Unfortunately, the person who logged that issue never reverted. I really hope that the suggested tweak to the surefire plugin to set the file.encoding does the trick.
Else do log an issue and cross-refer the above issue so that a notification goes out to the OP for that one. With your help I can hopefully finally replicate this issue, and I may need your help to create a fake large payload that can simulate this problem in my local environment.

Selenium Webdriver + Protractor + CucumberJS

Hello All
I've discovered an issues, which I'm not sure it really is an known issue with the framework or it's due to the versions of Protractor + CucumberJS that I am using, these are:
"cucumber": "~0.7.0",
"protractor": "~2.5.1",
"selenium-standalone": "3.0.0",
I'm using this versions as of today, I know that CucumberJS was separate from Protractor, but since our current project is using Node < 4, I cannot update it.
Having said this, the error that I'm having is when I run the test suite with protractor config.js and the seleniumAddress attribute commented (it starts up a webdriver automatically at random port)
The error that appears, when the suite finishes is:
throw new Error('This driver instance does not have a valid session ID ' +
^
BUT when I run the exact same suite, starting webdriver manually and setting the selenium address, the test passes!!!
The suite contains:
17 scenarios (17 passed)
55 steps (55 passed)
Does anyone knows what could be the reason? My first thought is that starting the server manually it would make webDriver slower, and therefore test actions would be too, so... but I had compared both time executions and there's only 1 second difference between both....
I had realized, that the problem with all is that since I had commented out the seleniumAddress line, Protractor was starting up webDriber-manager automatically, and when I added the line and manually started WebDriver, the error did not happen again. NOT sure what's the matter with it starting up automatically but, in case you ran into the same problem here's the solution!
Thanks

java.lang.NoClassDefFoundError: Could not initialize class org.apache.activemq.util.IdGenerator

I am trying to use ActiveMQ 5.10.0 with SoapUI 4.6 and Hermes 1.14. I get the error below when I try and add a queue. I presume Hermes can't find the type IdGenerator in any of the loaded jars. Which are:
activemq-client-5.10.0.jar
geronimo-j2ee-management_1.1_spec-1.0.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
Does anyone know where this class is defined? I looked for activemq-util.jar in the binary distribution but I did not find such a file.
Error:
java.lang.NoClassDefFoundError: Could not initialize class org.apache.activemq.util.IdGenerator
at org.apache.activemq.ActiveMQConnectionFactory.getClientIdGenerator(ActiveMQConnectionFactory.java:969)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:363)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:331)
at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:303)
at org.apache.activemq.ActiveMQConnectionFactory.createQueueConnection(ActiveMQConnectionFactory.java:260)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:147)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:92)
at hermes.impl.jms.ConnectionSharedManager.reconnect(ConnectionSharedManager.java:81)
at hermes.impl.jms.ConnectionSharedManager.connect(ConnectionSharedManager.java:91)
at hermes.impl.jms.ConnectionSharedManager.getConnection(ConnectionSharedManager.java:104)
at hermes.impl.jms.ConnectionSharedManager.getObject(ConnectionSharedManager.java:142)
at hermes.impl.jms.ThreadLocalSessionManager.connect(ThreadLocalSessionManager.java:190)
at hermes.impl.jms.ThreadLocalSessionManager.getSession(ThreadLocalSessionManager.java:570)
at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:460)
at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:367)
at hermes.browser.tasks.BrowseDestinationTask.invoke(BrowseDestinationTask.java:141)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Unknown Source)
This is very old but in case anyone else is trying to get this spun up... don't use the built in HermesJMS that comes with SoapUI. Apparently there's a bug in it that doesn't play nice with ActiveMQ v5.8 and following [I tried 5.11 & 5.13 and had the issue. The cheating fix is to install the standalone [I had to get it from sourceforge].
The sourceforge jar is installed with [assuming version 1.14]: java -jar hermes-installer-1.14.jar
Once installed you can tie this version to soapui or launch it with the bat/sh file. I still had issues with ActiveMQ version 5.13 but version 5.11 worked for me.
The IdGenerator class is located in the activemq-client jar. Here is the result of a search in the source tree:
/activemq-client/src/main/java/org/apache/activemq/util/IdGenerator.java
There's been no recent changes so I'd guess that the error is misleading and that it's actually some other missing dependency that's being loaded when the class is created. Is there more information in the log or a 'caused by exception' ?
For whom it may interest. This is kind of common issue I come accross from time to time. I call it jar version incompatibility. I was getting exception in title and other funny exceptions when using latest (but not actively developed) hermes 1.14 and currently latest Apache Active MQ 5.14. I've found out after a long struggle that it is fixed by using an older version of Active MQ - like 5.3.

selenium phpunit click function not working

I am using friefox 27.0.1 and selenium stand alone 2.15 i am getting below error for click()
RuntimeException: Invalid response while accessing the Selenium Server at : ERROR: Command execution failure. Please search the user group at https://groups.google.com/forum/#!forum/selenium-users for error details from the log window. The error message is: Argument 1 of EventTarget.dispatchEvent does not implement interface Event.
You are extremely out of date. Upgrade to the selenium standalone of 2.40.0 and this will fix your issue.
Source:
Person that had experience with this exact issue.
I updates selenium to 2.39.0 and firefox version to 28 then it worked fine for me.

Problems w/ OpenJML Update Site

When I try to install the openJML plugin from the update site at http://jmlspecs.sourceforge.net/openjml-updatesite I get the following error:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Artifact not found: ... (with about 4 or 5 jars)
I've tried installing previous versions of the plugin, but all result in similar "Artifact not found" errors. Anyone have any idea why this isn't working? Or have a workaround I could use to get the Eclipse plugin to work?
Thanks in advance!
A bug report has already been opened, but no one seems to care (yet):
http://sourceforge.net/p/jmlspecs/bugs/397/
Seems that you have to compile your own version of it.