TestNG could not instantiate selenium instance if i run server with user extensions

13 views
Skip to first unread message

AdityaQA

unread,
Jan 20, 2011, 11:30:56 AM1/20/11
to Selenium Users
Hi,

I am using TestNG framework, TestNG is not able to instantiate
selenium instance and hence tests are failing.

I am using following command to run the server

java -jar selenium-server-standalone-2.0a7.jar -userExtensions user-
extensions.js

Note:If i run the server without user-extensions, then
tests(independent of user-extensions.js) are executing without any
error.

Could someone please help to fix configuration issue

Error Trace

all:
[testng] [TestNG] Running:
[testng] Ant suite
[testng]
[testng] Exception in thread "main" java.lang.AssertionError: Could
not insta
ntiate a Selenium instance; please verify that your Selenium server is
running e
xpected:<true> but was:<false>
[testng] at org.testng.Assert.fail(Assert.java:89)
[testng] at org.testng.Assert.failNotEquals(Assert.java:480)
[testng] at org.testng.Assert.assertTrue(Assert.java:37)
[testng] at org.testng.Assert.assertNotNull(Assert.java:394)
[testng] at
automation.CaptureScreenshotOnFailure.getSelenium(CaptureScre
enshotOnFailure.java:41)
[testng] at
automation.CaptureScreenshotOnFailure.captureScreenshot(Captu
reScreenshotOnFailure.java:27)
[testng] at
automation.CaptureScreenshotOnFailure.onConfigurationFailure(
CaptureScreenshotOnFailure.java:23)
[testng] at
org.testng.internal.Invoker.runConfigurationListeners(Invoker
.java:1759)
[testng] at
org.testng.internal.Invoker.handleConfigurationFailure(Invoke
r.java:327)
[testng] at
org.testng.internal.Invoker.invokeConfigurations(Invoker.java
:220)
[testng] at
org.testng.internal.Invoker.invokeConfigurations(Invoker.java
:126)
[testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:
258)
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:221)
[testng] at
org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:
52)
[testng] at
org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
[testng] at org.testng.TestNG.runSuitesSequentially(TestNG.java:
1027)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:964)
[testng] at org.testng.TestNG.run(TestNG.java:896)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1193)
[testng] at org.testng.TestNG.main(TestNG.java:1153)
[testng] The tests failed.



Thanks,
Aditya

Aditya

unread,
Jan 27, 2011, 11:13:59 AM1/27/11
to Selenium Users
Can anyone please help me

Thanks,
Aditya


--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/selenium-users?hl=en.


BillR

unread,
Jan 27, 2011, 2:07:19 PM1/27/11
to Selenium Users
Are you sure you're using the correct server port in the client?
> > selenium-user...@googlegroups.com<selenium-users%2Bunsubscribe@go­oglegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/selenium-users?hl=en.- Hide quoted text -
>
> - Show quoted text -

Michael Yang

unread,
Jan 27, 2011, 11:41:36 AM1/27/11
to seleniu...@googlegroups.com
load your user-extensions.js in selenium IDE to see if any error messages pop up.

Aditya

unread,
Feb 1, 2011, 2:37:56 PM2/1/11
to seleniu...@googlegroups.com
I loaded user-extensions.js in IDE  and i didn't find any error pop-up.
The same configuration is working fine in other machine. it is failing in my laptop.
Can i know what happens exactly when i run selenium server with user extensions?

Thanks,
Aditya
Reply all
Reply to author
Forward
0 new messages