Driver executable must be set by the webdriver.ie.driver system property

后端 未结 5 1206
天命终不由人
天命终不由人 2020-11-28 05:09

I am using Selenium for automating the tests. My application exclusively uses IE, it will not work on other Browsers.

Code:

import org.openqa.seleniu         


        
5条回答
  •  北海茫月
    2020-11-28 05:55

    You will need have to download InternetExplorer driver executable on your system, download it from the source (http://code.google.com/p/selenium/downloads/list) after download unzip it and put on the place of somewhere in your computer. In my example, I will place it to D:\iexploredriver.exe

    Then you have write below code in your eclipse main class

       System.setProperty("webdriver.ie.driver", "D:/iexploredriver.exe");
       WebDriver driver = new InternetExplorerDriver();
    

提交回复
热议问题