How can I start InternetExplorerDriver using Selenium WebDriver

前端 未结 16 2653
半阙折子戏
半阙折子戏 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:45

    package Browser;

    import org.openqa.selenium.WebDriver; import org.openqa.selenium.ie.InternetExplorerDriver;

    public class Hello {

    public static void main(String[] args) {
    
    
        // setting IEdriver property
        System.setProperty("webdriver.ie.driver",
                "paste the path of the IEDriverserver.exe");
    
        WebDriver driver = new InternetExplorerDriver();
    
        // launching the google home screen
        driver.get("https://www.google.com/?gws_rd=ssl");
    
    }
    

    } //Hope this will work

提交回复
热议问题