0

QAチームの誰かにテスト用のWebDriver用のボイラープレートコードを設定しようとしています。私の問題は、私がInternet Explorerを動作させるように見えないことです。それはエラーを投げていると私はそれらを修正する方法や名前の問題のいくつかの並べ替えの場合は考えていない。 ドライバファイルはすべてC:\ドライブにあります。誰もが窓10を使用してのSafariをテストする方法を知っているだろう場合Selenium 3 InternetExplorerDriver Setup

chromedriver.exe、geckodriver.exe、以下のコードでIEDriverServer.exe

エラーが//、さらに

import org.openqa.selenium.By; 
    import org.openqa.selenium.WebDriver; 
    import org.openqa.selenium.WebElement; 
    import org.openqa.selenium.chrome.ChromeDriver; 
    import org.openqa.selenium.firefox.FirefoxDriver; 
    import org.openqa.selenium.ie.IEDriverService; //The import org.openqa.selenium.ie.IEDriverService cannot be resolved 

public class Loginmethod { 

public static void main(String[] args) throws InterruptedException { 
    System.setProperty("webdriver.gecko.driver", "C:\\\\geckodriver.exe"); 
    System.setProperty("webdriver.chrome.driver", "C:\\\\chromedriver.exe"); 
    System.setProperty("webdriver.ie.driver", "C:\\\\IEDriverServer.exe"); 
    WebDriver driver = new InternetExplorerDriver(); //InternetExplorerDriver cannot be resolved to a type 
    driver.get("http://www.google.com/"); 

    Thread.sleep(100); 


} 
} 

をコメントしていますセレンで、それは素晴らしいでしょう。

答えて

1

インポートしようとしているクラスが使用しているクラスではありません。

IEDriverServiceをインポートしていますが、InternetExplorerDriverクラスを使用しています。

InternetExplorerDriverをインポートするようにコードを変更してください。

+0

ああそうです。 IEのSystem.setProperty行を挿入すると、何とかインポートセクションのIEDriverServiceが自動的に追加されました。 –

+0

うれしく思うよ。 – sircapsalot

+0

あなたが言ったようにコードを変更した後も、それは同じエラーを投げる。日食を除いて、アイコンは鮮やかなピンク色ではなくグレーになっています。 –

関連する問題