|
public void testElegroupElec() throws Exception {
selenium.open("/epmis/jsp/elegroupquery/elegroup_elec_index.jsp?functioncode=ZYHDLSJCK");
selenium.selectFrame("ffffff");
selenium.click("sd3");
selenium.click("sd4");
selenium.click("sd1");
selenium.click("sd2");
selenium.selectFrame("relative=up");
selenium.selectFrame("rightframe");
selenium.selectFrame("condFrame");
selenium.waitForPageToLoad("50000");
selenium.click("//input[@value='查询']");
}
selenium生成的测试脚本,怎么执行到selenium.selectFrame("condFrame");就报错
com.thoughtworks.selenium.SeleniumException: ERROR: Element condFrame not found
at com.thoughtworks.selenium.HttpCommandProcessor.throwAssertionFailureExceptionOrError(HttpCommandProcessor.java:97)
at com.thoughtworks.selenium.HttpCommandProcessor.doCommand(HttpCommandProcessor.java:91)
at com.thoughtworks.selenium.DefaultSelenium.selectFrame(DefaultSelenium.java:355)
at com.example.tests.groupusers.ElegroupElec.testElegroupElec(ElegroupElec.java:27)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at junit.framework.TestCase.runTest(TestCase.java:154)
at junit.framework.TestCase.runBare(TestCase.java:127)
at com.thoughtworks.selenium.SeleneseTestCase.runBare(SeleneseTestCase.java:212)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
各位大侠帮忙看看,我刚接触,感觉selenium不稳定啊! |
|