2016-11-09 6 views
1

私は私の最初のセレンスクレーパーを構築しています、と私はエラーを取得しています:スレッドで 例外「メイン」org.openqa.selenium.SessionNotCreatedException:新しいリモートセッションを作成することができませんが。次のコードに機能=機能[{ensureCleanSession =真、browserName =インターネットエクスプローラ、バージョン=、プラットフォーム= WINDOWS}]、必要な機能=機能[{}]にセレンInternet Explorerのドライバ希望の機能エラー

を希望:

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/"); 
+0

何が間違っていますか?私はGoogleで見つけられるすべてのソリューションを試しました。 –

答えて

1

はあなたを持っていますSeleniumでIEを使用するための追加のNugetパッケージをインストールしましたか? "Selenium.WebDriver.IEDriver"

+0

ありがとう、しかし、私は実際に問題を理解しました。他の誰かがこの問題に遭遇すると、問題はIEの設定と関係しています。 4つのゾーンすべてに対してプロテクトモードを有効にするだけです。 –

関連する問題