org.testng.TestNGException

Cannot inject @Test annotated Method [f] with [interface org.openqa.selenium.WebDriver]. For more information on native dependency injection please refer to http://testng.org/doc/documentation-main.html#native-dependency-injection

Samebug tips0

There are no available Samebug tips for this exception. If you know how to solve this issue, help other users by writing a short tip.

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

Solutions on the web152

  • Cannot inject @Test annotated Method [f] with [interface org.openqa.selenium.WebDriver]. For more information on native dependency injection please refer to http://testng.org/doc/documentation-main.html#native-dependency-injection
  • via Stack Overflow by Sanchit
    , 3 months ago
    Cannot inject @Test annotated Method [IO_login] with [interface org.openqa.selenium.WebDriver]. For more information on native dependency injection please refer to http://testng.org/doc/documentation-main.html#native-dependency-injection
  • Cannot inject @Test annotated Method [main] with [class [Ljava.lang.String;]. For more information on native dependency injection please refer to http://testng.org/doc/documentation-main.html#native-dependency-injection
  • Stack trace

    • org.testng.TestNGException: Cannot inject @Test annotated Method [f] with [interface org.openqa.selenium.WebDriver]. For more information on native dependency injection please refer to http://testng.org/doc/documentation-main.html#native-dependency-injection at org.testng.internal.Parameters.checkParameterTypes(Parameters.java:244) at org.testng.internal.Parameters.createParameters(Parameters.java:172) at org.testng.internal.Parameters.createParameters(Parameters.java:458) at org.testng.internal.Parameters.handleParameters(Parameters.java:568) at org.testng.internal.Invoker.handleParameters(Invoker.java:1293) at org.testng.internal.Invoker.createParameters(Invoker.java:1020) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1110) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112) at org.testng.TestRunner.privateRun(TestRunner.java:756) at org.testng.TestRunner.run(TestRunner.java:610) at org.testng.SuiteRunner.runTest(SuiteRunner.java:387) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:382) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:340) at org.testng.SuiteRunner.run(SuiteRunner.java:289) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1293) at org.testng.TestNG.runSuitesLocally(TestNG.java:1218) at org.testng.TestNG.runSuites(TestNG.java:1133) at org.testng.TestNG.run(TestNG.java:1104) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:236) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:81)

    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 user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    Unknown user
    Once, 1 year ago
    4 more bugmates