How to avoid challenges in running Selenium scripts in IE browser?

Test automation is efficient when we have a unified framework which supports cross browser testing. Now we just touched the string of cross browser testing, hence, we can’t ignore running our tests in IE browser (Internet Explorer). Configuration in IE browser is different than browsers like Chrome, Firefox, Opera, Safari, etc. We need to adjust various settings when we want to open web application properly with Internet Explorer browser. Today’s agenda is fully on avoiding different challenges which we face in running Selenium scripts in IE browser.

The first and primary challenge we face with IE is the less support for the changes in UI. If a web page has loaded with all its objects on Chrome and Firefox then it is fewer chances that the entire UI will be loaded in IE browser (Some elements might miss loading); we have seen this change when we were discussing cross browser testing.

Today we will discuss various challenges in running Selenium scripts in IE browser one by one and along with challenges, we will find the solutions as well.

Isn’t it interesting?

Let’s begin the learning journey now.

List of different challenges in running Selenium scripts in IE browser

NoSuchWindowException

If you are getting this exception then you can handle it simply by making changes in IE settings. Let me tell you how you can handle it. Look at the menu bar and click on Tools menu or press Alt with T, then select Internet Options sub menu inside Tools. A new window will pop up and make changes as per the following screenshot.

Internet Options in IE browser

Click on each option in circle then click on Enable Protected Mode. After checking all checkbox for all the options in circle finally apply and click OK.

Suggested Readings:

Slow Interaction with the Web Elements

You might observe that WebDriver is slowly interacting with the Web Elements, maybe it is taking 2-3 seconds. So, in that case, you can use IE driver 32 bit, instead of 64 bit, even though your OS is 64 bit.

Browser is blank after URL hit

When WebDriver hits your test URL, you don’t see any web page (IE browser opened) so in such case, you need to adjust the browser’s zoom settings. Again, hit Alt with V from your keyboard and go to Zoom and adjust the zoom percentage with respect to your monitor. See screenshot below.

IE browser Zoom Adjust

Challenges due to unhandled untrusted SSL certificate

Even if you manually open a website with untrusted SSL or HTTPS then you see a special type of message in IE browser. We must handle it efficiently to avoid any kind of roadblock in tests execution with Selenium Scripts.

I have already written an exclusive tutorial to handle untrusted SSL certificate error. You can read it by clicking on the following link.

How to handle untrusted SSL certificate in Internet Explorer browser?

Handling Browser authentication window in Selenium WebDriver

Pro Tip

If you are a Framework developer or Selenium script developer then I will recommend you maintaining a separate object repository for IE browser. It will help you to avoid trouble when your test automation pack becomes too bulkier.

If I have missed anything then you can suggest your points in a comment below. Join our social media channels and FB group for the latest updates on Selenium and Test Automation.

 
Join Inviul fb group

Leave a Reply