我在eclipse中使用Selenium jar文件创建了一个java项目。 使用JUnit测试运行时,我收到Java异常错误:Selenium RC java异常问题
package com.example.tests;
import com.thoughtworks.selenium。*;
import java.util.ArrayList; import java.util.HashMap; import com.infy.csvUtil.CSVFileReader;
public class Creation extends SeleneseTestCase public void setUp()throws Exception setUp(“http://14.126.220.15:84333/”,“* firefox”); }
public void Creationv2() throws Exception {
try {
selenium.open("CCC/CEP?REQUEST=SIGNONREQ");
} catch (Exception e) {
e.printStackTrace();
}
selenium.selectWindow(null);
assertEquals("Selected panel window", selenium.getTitle());
selenium.type("SignonUserName", "sssss");
selenium.type("SignonPassword", "fewere");
selenium.click("button1");
if (selenium.isAlertPresent()) {
selenium.getAlert();
}
我收到以下错误运行时:
* * Java.lang.Assertionexception:应为 “选择面板窗口”,但看到 “” 代替。