org.testng.TestNGException

Cannot instantiate class com.SF.TestCases.Administrator_Test_Case

Samebug tips1

Take a look at this blog post on how to set up Grid2 https://goo.gl/rxzbE6. A user related (in the email group on the source) that using older selenium libs solves this exception.


rafaelrafael

Don't give up yet. Our experts can help. Paste your full stack trace to get a solution.

Solutions on the web673

Stack trace

  • org.testng.TestNGException: Cannot instantiate class com.SF.TestCases.Administrator_Test_Case at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:40) at org.testng.internal.ClassHelper.createInstance1(ClassHelper.java:382) at org.testng.internal.ClassHelper.createInstance(ClassHelper.java:295) at org.testng.internal.ClassImpl.getDefaultInstance(ClassImpl.java:118) at org.testng.internal.ClassImpl.getInstances(ClassImpl.java:183) at org.testng.internal.TestNGClassFinder.<init>(TestNGClassFinder.java:128) at org.testng.TestRunner.initMethods(TestRunner.java:416) at org.testng.TestRunner.init(TestRunner.java:242) at org.testng.TestRunner.init(TestRunner.java:212) at org.testng.TestRunner.<init>(TestRunner.java:166) at org.testng.remote.RemoteTestNG$1.newTestRunner(RemoteTestNG.java:143) at org.testng.remote.RemoteTestNG$DelegatingTestRunnerFactory.newTestRunner(RemoteTestNG.java:272) at org.testng.SuiteRunner$ProxyTestRunnerFactory.newTestRunner(SuiteRunner.java:587) at org.testng.SuiteRunner.init(SuiteRunner.java:161) at org.testng.SuiteRunner.<init>(SuiteRunner.java:114) at org.testng.TestNG.createSuiteRunner(TestNG.java:1290) at org.testng.TestNG.createSuiteRunners(TestNG.java:1277) at org.testng.TestNG.runSuitesLocally(TestNG.java:1131) at org.testng.TestNG.run(TestNG.java:1048) at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:112) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:205) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:176) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.testng.internal.ObjectFactoryImpl.newInstance(ObjectFactoryImpl.java:29) ... 21 more Caused by: java.lang.NullPointerException at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212) at org.openqa.selenium.support.ui.FluentWait.<init>(FluentWait.java:102) at org.openqa.selenium.support.ui.WebDriverWait.<init>(WebDriverWait.java:71) at org.openqa.selenium.support.ui.WebDriverWait.<init>(WebDriverWait.java:45) at com.SF.Pages.SFQA_Administrator.<init>(SFQA_Administrator.java:17) at com.SF.TestCases.Administrator_Test_Case.<init>(Administrator_Test_Case.java:16) ... 26 more

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
Unknown visitor
Unknown visitorOnce,
brunosatrianibrunosatriani
8 times, last one
bayukresnobayukresno
Once,
85 more bugmates