How can I start InternetExplorerDriver using Selenium WebDriver

前端 未结 16 2650
半阙折子戏
半阙折子戏 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条回答
  •  Happy的楠姐
    2020-12-30 17:35

    In the same way for Chrome Browser below are the things to be considered.

    Step 1-->Import files Required for Chrome :
    import org.openqa.selenium.chrome.*;

    Step 2--> Set the Path and initialize the Chrome Driver:

    System.setProperty("webdriver.chrome.driver","S:\\chromedriver_win32\\chromedriver.exe");
    

    Note: In Step 2 the location should point the chromedriver.exe file's storage location in your system drive

    step 3--> Create an instance of Chrome browser

    WebDriver driver = new ChromeDriver();
    

    Rest will be the same as...

提交回复
热议问题