I am implementing page factory model for testing. For 1st Test case, i am getting above error. Please help me regarding the same. It is telling "Cannot inject @Test annotated Method with [interface org.openqa.selenium.WebDriver]."
我有一个名为Home的类,另一个TestCase类引用了Home元素,用于传递参数。
[RemoteTestNG] detected TestNG version 6.10.0
[TestNG] Running:
C:\Users\ue\AppData\Local\Temp\testng-eclipse-1220071011\testng-customsuite.xml
[Error] org.testng.TestNGException:
Cannot inject @Test annotated Method [verifyLoginWithInvalidCredentials] 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)