Selenium Internet Explorer 驱动程序所需的功能错误
Selenium Internet Explorer Driver Desired Capabilities Error
我正在构建我的第一个 Selenium scraper,但出现错误:
线程 "main" org.openqa.selenium.SessionNotCreatedException 中的异常:无法创建新的远程会话。所需功能 = 功能 [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}], 所需功能 = 功能 [{}]
关于以下代码:
import java.io.*;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class Logon {
static String driverPath = "C:/Users/2172633/Selenium/";
public WebDriver driver;
public void setUp() {
System.out.println("*******************");
System.out.println("launching IE browser");
System.setProperty("webdriver.ie.driver", driverPath+"IEDriverServer.exe");
driver = new InternetExplorerDriver();
driver.manage().window().maximize();
}
public static void main(String[] args) throws IOException {
Logon Logon = new Logon();
Logon.setUp();
DesiredCapabilities.internetExplorer();
}
public void login(String userName, String Password) throws IOException {
driver.navigate().to("https://www.kroger.com/");
在Selenium 中使用IE 时,您是否安装了额外的Nuget 包? "Selenium.WebDriver.IEDriver"
我正在构建我的第一个 Selenium scraper,但出现错误: 线程 "main" org.openqa.selenium.SessionNotCreatedException 中的异常:无法创建新的远程会话。所需功能 = 功能 [{ensureCleanSession=true, browserName=internet explorer, version=, platform=WINDOWS}], 所需功能 = 功能 [{}]
关于以下代码:
import java.io.*;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.By;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.remote.DesiredCapabilities;
public class Logon {
static String driverPath = "C:/Users/2172633/Selenium/";
public WebDriver driver;
public void setUp() {
System.out.println("*******************");
System.out.println("launching IE browser");
System.setProperty("webdriver.ie.driver", driverPath+"IEDriverServer.exe");
driver = new InternetExplorerDriver();
driver.manage().window().maximize();
}
public static void main(String[] args) throws IOException {
Logon Logon = new Logon();
Logon.setUp();
DesiredCapabilities.internetExplorer();
}
public void login(String userName, String Password) throws IOException {
driver.navigate().to("https://www.kroger.com/");
在Selenium 中使用IE 时,您是否安装了额外的Nuget 包? "Selenium.WebDriver.IEDriver"