セレンでの gmail ログインの否定的なテスト ケースをアサートしようとしていますが、例外が発生します。誰が問題を提案できますか?
@Test(dataProvider="LoginData")
public void testMethod(String email,String password) throws InterruptedException{
browser.findElement(By.id("Email")).clear();
browser.findElement(By.id("Email")).sendKeys(email);
browser.findElement(By.id("Passwd")).sendKeys(password);
browser.findElement(By.id("signIn")).click();
browser.wait(30000);
assertTrue(browser.getPageSource().contains("The username or password you entered is incorrect."));
}
生成された例外
java.lang.IllegalMonitorStateException
at java.lang.Object.wait(Native Method)
at seleniumExcel.DataProviderAutomation.testMethod(DataProviderAutomation.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
at org.testng.TestRunner.privateRun(TestRunner.java:767)