我收到以下错误,当我试图运行我的脚本
org.testng.TestNGException:无法实例类产生的原因:java.lang.IllegalStateException:java.lang.reflect.InvocationTargetException通过造成的驾驶员可执行文件的路径必须由webdriver.ie.driver系统属性进行设置;
package EDRTermsPackge;
import org.testng.annotations.Test;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.BeforeMethod;
public class ContactInformationTesting {
//For use of IE only; Please enable for IE Browser
WebDriver driver = new InternetExplorerDriver();
@BeforeMethod
public void beforeMethod() {
//Using or Launching Internet Explorer
String exePath = "\\Users\\jj85274\\Desktop\\IEDriverServer.exe";
//For use of IE only; Please enable for IE Browser
System.setProperty("webdriver.ie.driver", exePath);
}
@Test
public void OpenPage_Login() {
driver.get("http://cp-qa.harriscomputer.com/");
}
}