seleniumselenium-webdriverautomated-testsselenium-iedrivernunittestadapter

Webdriver for IE9 and 10


I would like to ask if there a specific webdriver to run a testcase for internet explorer 9 or 10? or this code driver = new InternetExplorerDriver(); will do to test internet explorer 9 testcases? anyone know?


Solution

  • Yes, you can directly use driver = new InternetExplorerDriver(); directly for launching tests in IE. But if you are trying to launch an https URLs in IE9 and above, you are most likely going to face "There is a problem with this website's security certificate" error. In this case you need to click on the "Continue to this website (not recommended)." link for navigation to the URL. To solve this you can use

    new WebDriverWait(driver, 10).until(ExpectedConditions.titleContains("Certificate"));
    driver.navigate().to("javascript:document.getElementById('overridelink').click()");
    

    By using this your page will wait for the certificate to appear and then click on it.

    Note: The above case is only applicable if you get certificate error.