Unable to launch IE browser in selenium webdriver

前端 未结 7 1218
再見小時候
再見小時候 2020-12-31 22:08

I have written a sample code to launch IE browser and load google page.

public class Sample {

 public static void main(String[] args) 
  {
             


        
7条回答
  •  遥遥无期
    2020-12-31 22:49

    I completely agree with sandeep's solution along with that for setting zoom level to 100% permanently i am adding few code lines as i faced issue to set this.

    These are the code lines i found after i browsed for the zoom level 100% error:

    System.setProperty("webdriver.ie.driver", "C:/Drivers/IEDriverServer.exe");
    DesiredCapabilities capabilities = DesiredCapabilities.internetExplorer();
    capabilities.setCapability("ignoreZoomSetting", true);
    driver= new InternetExplorerDriver(capabilities);           
    driver.manage().window().maximize();
    

    For the security settings to execute code through IE : follow the steps in this link.` 'http://www.seleniumeasy.com/selenium-tutorials/how-to-run-webdriver-in-ie-browser'

    Hope this solution helps you.... :)

提交回复
热议问题