How can I start InternetExplorerDriver using Selenium WebDriver

前端 未结 16 2656
半阙折子戏
半阙折子戏 2020-12-30 17:23

I downloaded the driver and I gave the exact path in my code but when I ran the code it shows me error

my code with java is as below:

System.out.prin         


        
16条回答
  •  死守一世寂寞
    2020-12-30 17:52

    First download the exe file of the IEDriverServer (64 bit and 32 bit). Don't need to install, only download this file with your browser( 64 or 32 bit) and simply give the path of the exe file in the given code.

    http://www.seleniumhq.org/download/

    use this code

    package myProject;
    
    import org.openqa.selenium.ie.InternetExplorerDriver;
    
    public class Browserlaunch {
    
        public static void main(String[] args) {
    
            System.setProperty("webdriver.ie.driver", "C:/Drivers/IEDriverServer.exe");
            InternetExplorerDriver IEDriver=new InternetExplorerDriver();
            IEDriver.get("http://localhost:8888");
        }
    }
    

提交回复
热议问题