Всем ещё раз привет,
в общем…имею такую проблему…
import Test.Clicker;
import Test.Reservation;
import junit.framework.Assert;
import org.junit.After;
import org.junit.Test;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import java.util.concurrent.TimeUnit;
public class Reserv {
private InternetExplorerDriver driver;
@org.junit.Before
public void setUp() throws Exception {
System.setProperty("webdriver.ie.driver", "C:\\Users\\xxx\\IEDriverServer.exe");
driver = new InternetExplorerDriver();
driver.manage().timeouts().implicitlyWait(3, TimeUnit.SECONDS);
driver.manage().window().maximize();
driver.get("http://od.ua/");
}
@After
public void tearDown() throws Exception {
driver.close();
}
@Test
public void testReservationPage() throws Exception {
Reservation view1 = new Reservation(driver);
Clicker res1 = view1.reservation1("");
Assert.assertTrue(res1.getReservationName().contains("c"));
Reservation view2 = new Reservation(driver);
Clicker res2 = view2.reservation2("");
Assert.assertTrue(res2.getDetails().contains("a"));
Reservation view3 = new Reservation(driver);
Clicker res3 = view3.reservation3("");
Assert.assertTrue(res3.getReservationName2().contains("b"));
}
}
Error:
The path to the driver executable must be set by the webdriver.ie.driver system property
самое интересное, что когда я делал:
private ChromeDriver driver;
@org.junit.Before
public void setUp() throws Exception {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\xxx\\IEDriverServer.exe");
driver = new ChromeDriver();
Запускался IE и нормально работало
как можно решить данную проблему, используя всё же “InternetExplorerDriver”