Challenges with IE browser in Selenium Webdriver

This post is going to useful for them who are working on Selenium with IE browsers and for them who are attending interviews because today we are going to discuss Issues with IE browser.

This post is going to useful for them who are working on Selenium with IE browsers and for them who are attending interviews, because today we are going to discuss Issues with IE browser. Check out the below post if you have not tried IE Browser in Selenium.

Check out the below post if you have not tried IE Browser in Selenium.

Start writing Selenium script with Selenium Webdriver

 

Challenges with IE browser in Selenium Webdriver

You will get the different type of Exception while working with IE Browser I will try to sum up some exception, which I faced and what are the solutions that worked for me.

If you are new to Selenium then check below URL to get familiar with exceptions.

How to handle exception in Selenium

What are the exception available in Selenium

Exceptions and their Solutions

Issues 1-

  • openqa.selenium.NoSuchWindowException

This is a common issue with Selenium and you can avoid this by doing some IE setting, which we are going to discuss now.

 

Issue 2-

  • sendKeys works very slow it takes 1-2 second to type each character.

This is a known issue with Selenium and it only happens once you work with IE 64 bit driver.

Solution- You can download IE Driver 32 bit and start using it, even you are working with 64 bit OS this 32 bit IE driver works every time.

 

Issue 3-

  • Unexpected error launching Internet Explorer. Protected Mode must be set to the same value

When I started working with IE this was the first exception, which I used to get, and I was sure that this related to some browser setting.

You can make the below changes in IE and this exception will not come again.

Please make the following changes as per screenshot.

Click ALT button from keyboard.

Challenges with IE browser in Selenium Webdriver

 

Click on the security tab and click on the Internet icon and enable protected mode.Challenges with IE browser in Selenium Webdriver

 

Same settings we have to do for other zones as well so select Local intranet.

Challenges with IE browser in Selenium Webdriver

 

Click on Trusted sites and click on enable checkbox and navigate to Restricted sites.

 

 

 

 

 

 

Challenges with IE browser in Selenium Webdriver

 

 

 

Challenges with IE browser in Selenium Webdriver

 

Finally click on OK and apply and you are done.

Issue 4-

Unexpected error launching Internet Explorer. Browser zoom level was set to 0%

By the name itself, you can see that we have to set the zoom level to 100 % to make it work.

You can follow below instruction to set browser zoom level.Problem 4- Unexpected error launching Internet Explorer. Browser zoom level was set to 0%  By name itself, you can see that we have to set zoom level to 100 % to make it work.  You can follow below instruction to set browser zoom level.

 

Issue 5: 

Handle Untrusted SSL certificate error in IE browser in different ways
Solution: IE is the product of Microsoft and IE is much worried about security so when you start working with some https application you will get a untrusted certificate.

Selenium has so many ways to handle this, but we will see 2 ways which work all the time for me.

First:
1- 
 Open the application for which SSL certificate is coming so use below code after passing the URL.
driver.get(“ur app URL”);
driver.navigate().to(“javascript:document.getElementById(‘overridelink’).click()”);
// you can use your code now

Second:

You can handle this certificate using Desired Capabilities as well.

I have already covered this topic long back so follow below link to handle certificates in IE, Chrome, Firefox etc.

How to handle certificate in Selenium Webdriver

This is what I faced and the solution that I know. In case you have some other thing which you want to add then please comment below or contact me to add some more relevant stuff on IE.

For More updates Learn Automation page

For any query join Selenium group- Selenium Group

Comment below for any clarification

 

24 Comments

  1. Afsar Ali
  2. nidhi
  3. Preetish Kumar Mahato
  4. Sonali
  5. Preetish Kumar Mahato
  6. Jaspal
      • Jaspal
  7. Vijay
  8. Devari
      • Rony
  9. haritha
  10. prasad

Leave a Reply