selenium-server-standalone-2.20.0.jar -userExtensions command line argument throwing error - selenium-rc

I was trying to execute selenium ide test suite with the following commandline.
java -jar selenium-server-standalone-2.20.0.jar -userExtensions: "C:\Selenium\user-extensions.js" -htmlSuite "*iexplore" "http://google.com" "C:\Selenium\3" "C:\Selenium\results1.html"
I observed that, without -userExtensions argument above command executes perfectly fine but when i added -userExtensions argument it threw following error,
11:13:39.734 WARN - Embedded iexplore seems to have ended on its own (did we kil
l the real browser???)
Tests failed, see result file for details: C:\Selenium\results1.html
On the other hand if I change the browser to firefox then script stuck at following
11:20:52.296 INFO - Checking Resource aliases.
What is possibly going wrong with the -userExtensions argument.
Help on this would be highly appreciated.

I had the exact same issue. It turned out I had extensions in there that was incompatible with selenium server. Removing those extensions fixed the issue.

Related

How do I resolve oracle jdbc proxy class error in Evosuite generated tests?

I've written a JDBC driver and I'm trying to use Evosuite to generate the tests for it.
I'm using the following command line:
mvn -Dcores=5 -DmemoryInMB=5000 -Dmock_if_no_generator=false -DextraArgs=' -Dmock_if_no_generator=false -Dskip_covered=true Duse_separate_classloader=false -Dmax_recursion=50 -Dlocal_search_restore_coverage=true -Duse_existing_coverage=true -Dsandbox=false -Dsort_calls=true 'evosuite:generate
The code that is generated is below:
oracle.1jdbc.1replay.1driver.1NonTxnReplayableBase.2java.1sql.1DatabaseMetaData...Proxy oracle_1jdbc_1replay_1driver_1NonTxnReplayableBase_2java_1sql_1DatabaseMetaData___Proxy0 = new oracle.1jdbc.1replay.1driver.1NonTxnReplayableBase.2java.1sql.1DatabaseMetaData...Proxy((DatabaseMetaData) null, "k-{`1N&KKC", proxyFactory0, hashtable0);
and I'm getting the following error on the first line:
:[4618,7] not a statement
:[4618,13] ';' expected
(getting this error three times on the same line)
I was hoping to turn off the mocking but it didn't work it seems.
I'll try to see if I can provide more details later, but any initial thoughts from anyone?
Thanks!

AdminTask.listTCPEndPoints('abc(abc)') throws exception: ADMF0007E: target object is required

I'm working on deploying application to WebSphere 7 using python script and the script is throwing exception at this line:-
AdminTask.listTCPEndPoints('abc(abc)')
If I run the above command before I run the python script, it works fine. It gives me an error ADMF0003E: Invalid parameter value. But the same command fails in the python script with this error:
wsadmin>AdminTask.listTCPEndPoints('abc(abc)')
WASX7015E: Exception running command: "AdminTask.listTCPEndPoints('abc(abc)')"; exception information: com.ibm.websphere.management.cmdframework.CommandValidationException: ADMF0007E: target object is required.
I can guess that there something in the python script that is causing this issue, but I don't understand why is the AdminTask.listTCPEndPoints command is not able to see the parameter being passed. I'm new to WebSphere, I have only used it in past but never configured it. Any help/insight would be highly appreciated.
Thanks!
Added stack trace of interactive mode option
wsadmin>print AdminTask.listTCPEndPoints('-interactive')
List NamedEndPoints that can be used by a TCPInboundChannel
Lists all NamedEndPoints that can be associated with a TCPInboundChannel
*TCPInboundChannel: abc(abc)
excludeDistinguished (excludeDistinguished): 0
WASX7435W: Value 0 is converted to a boolean value of false.
unusedOnly (unusedOnly): 0
WASX7435W: Value 0 is converted to a boolean value of false.
List NamedEndPoints that can be used by a TCPInboundChannel
F (Finish)
C (Cancel)
Select [F, C]: [F] F
WASX7278I: Generated command line: AdminTask.listTCPEndPoints('[-excludeDistinguished false -unusedOnly false]')
WASX7015E: Exception running command: "AdminTask.listTCPEndPoints('-interactive')"; exception information:
com.ibm.websphere.management.cmdframework.CommandValidationException: ADMF0007E: target object is required.
Follow this link. It appears that you have not specified the target object that's why that error is coming.
I suggest use the following command as a starter
print AdminTask.listTCPEndPoints('-interactive')
Note: Instead of copying and pasting the command, type it on the command line. sometimes command editor does not take the command after pasting it directly.
Okay, I was able to fix the error. I was getting that error because as part of the application deployment script, I was copying few of my application jars to WebSphere's java/jre/lib/ext directory so that those are available in classpath. In one of those jar, I had bundled an IBM class (Base64Coder.class) which was required by a class in my jar and it was corrupting the WebSphere AdminTask utility. When I removed that Base64Coder.class from my jar, python script worked fine. I believe, the reason it corrupted WebSphere was that there was a duplication of the same class in the JVM as the class comes with IBM WebSphere installation and was present in AppServer/runtimes/com.ibm.ws.webservices.thinclient_7.0.0.jar

TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')

For some reason I'm getting intermittent failure to run (or at least report the running of) my jasmine tests. the error lies in run-jasmine.js and the error manifests itself as
`TypeError: null is not an object (evaluating 'document.body.querySelector('.alert > .bar.passed').innerText')
phantomjs://webpage.evaluate():58
phantomjs://webpage.evaluate():61`
I am running TeamCity 8.1.3 (build 30101), Jasmine 2.2.0 and phantomjs 2.0.0.
Build step command parameters are
--web-security=no
--local-to-remote-url-access=yes
--ignore-ssl-errors=yes
jasmine/run-jasmine.js
specs/SpecsRunner.html
I've tried downgrading Jasmine and phantomjs but no change. I've also tried various run-jasmine.js scripts but to no avail. Is anyone else having a similar problem?
Everything was fine until a few days ago and now it happens 90% of the time.
Thanks in advance.
I've found a new run-jasmine.js script that does the job.
daniel-chambers / run-jasmine.js
I tried this script before but was getting a problem with timeouts so I moved on but now I've increased the 'Default Max Timeout' in the script to 60 seconds, it seems to do the trick just fine.

Jmeter 2.10 and 2.11 don't let me start a HTTP Script Recorder

I'm having trouble starting a proxy server for jmeter 2.10 and 2.11. I found a couple links here on SO and apache.org but my error message is slightly different that what's written on these links. Per the wiki from apache.org, I don't think I have trouble finding keytool because it returns the path when I do a
which keytool
/usr/bin/keytool
and I don't have trouble creating a file in the jmeter-210 and jmeter-211/bin dirs. This is the error message I get in my jmeter.log file:
ERROR - jmeter.protocol.http.proxy.ProxyControl: Could not initialise key store java.io.IOException: Command :'"keytool" "-genkeypair" "-alias" ":root_ca:" "-dname" "CN=_ DO NOT INSTALL unless this is your certificate (JMeter root CA), OU=Username: COMPANY\user.name, C=US" "-keyalg" "RSA" "-keystore" "proxyserver.jks" "-storepass" "randomstr1" "-keypass" "randomstr1" "-validity" "7" "-ext" "bc:c"' failed, code: 1
keytool error: java.io.IOException: Invalid escaped character in AVA: 's'
I don't know what this "invalid escaped char in AVA" is. My company and username don't have the string "AVA" and I didn't find it in any of the property files in jmeter-21x/bin.
Not sure if this is affecting it but I'm running jmeter from Darwin on a MBP, OSX 10.7.5.
JMeter 2.9 doesn't give me any proxy issues, although, I ran into other issues with it, which is why I tried using these 2 newer versions, which are giving me problems with the proxy server. I'll try going down to 2.8 to see what happens but I'd rather not if I can help it. That and I'm super curious what the issue is with 2.1x and my laptop. Thanks in advance for your help.
EDIT: The COMPANY/user.name part of the error message was changed this way to sanitize the error message, although, I will try at home on my linux box to see if the funny username representation is the cause.
As per sebb response on User Mailing List:
"I suspect it might be in the string "COMPANY\user.name" which is
derived from the Java system property "user.name".
You could try redefining it on the command line (or in
system.properties) to something simpler, for example:
-Duser.name=foobar
A bug has been opened to fix this issue with "\" character:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56178

Debug jboss app in Intellij idea

I am using intellij idea and jboss server.
When I run it it works fine but when I debug it it gives me:
ERROR: transport error 202: connect failed: Connection refused
ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510)
JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [../../../src/share/back/debugInit.c:690]
FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197)
Disconnected from server
What is the problem?
Make sure the jboss vm is running with the parameters Idea shows in Debug dialog - specifically the port number seems incorrect to me.
If you're running on OS X Mountain Lion you could try popping -d64 into the VM options, that seemed to work for me. Not passing the variables, I think, will just prevent you from debugging.
For more information check here.
Unchecking the pass variables didn't work for me. What I ended up doing running the jBOSS separately and using 'Remote jBOSS' configuration in intelliJ.
To make debugging work I ened up adding the following lines to the "standalone.sh"
DEBUG_JAVA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=localhost:62307,suspend=n,server=y "
JAVA_OPTS="${DEBUG_JAVA_OPTS} $JAVA_OPTS"
The value of DEBUG_JAVA_OPTS has to be copy and pasted from IntelliJ dialog box. These lines have to be inserted into the script right after the place where script sets up "JAVA_OPTS"
Update:
Looks like IDE generates a new port number for each project. So you have to edit the standalone.sh file every time you switch project. Hopefully somebody can suggest a fix for it.
Another option might be to comment out the 'if' statement in standalone.conf as below.
Note the first $JAVA_OPTS is added (it is the one passed in from IntelliJ). This way there is no need to remember to change the port number for every project.
#Specify options to pass to the Java VM.
#
#if [ "x$JAVA_OPTS" = "x" ]; then
JAVA_OPTS="$JAVA_OPTS -Xms64m -Xmx512m -XX:MaxPermSize=256m - Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"
JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"
#else
#echo "JAVA_OPTS already set in environment; overriding default settings with val ues: $JAVA_OPTS"
#fi

Resources