{"id":2674,"date":"2020-04-21T23:38:02","date_gmt":"2020-04-21T18:08:02","guid":{"rendered":"https:\/\/www.h2kinfosys.com\/blog\/?p=2674"},"modified":"2025-04-02T08:51:35","modified_gmt":"2025-04-02T12:51:35","slug":"running-tests-on-selenium-using-internet-explorer-browser","status":"publish","type":"post","link":"https:\/\/www.h2kinfosys.com\/blog\/running-tests-on-selenium-using-internet-explorer-browser\/","title":{"rendered":"Running Tests on Selenium using Internet Explorer browser"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">Running Tests on Selenium in Internet Explorer is quite easy. We have to communicate with Internet Explorer to launch Internet Explorer through Internet Explorer driver.<\/span><\/p>\n<h2><b>Internet Explorer Driver Server<\/b><\/h2>\n<p><span style=\"font-weight: 400;\">Internet Explorer Driver Server is a link between your selenium scripts and the Internet Explorer browser. You won\u2019t be able to communicate with the Internet Explorer browser, without running the server on your system.<\/span><\/p>\n<p>The Internet Explorer driver server is a tiny application created by the Selenium WebDriver team. As Internet Explorer does not have an API or native implementation in Java, they had no choice but to create a server. IE Driver Server implements the WebDriver protocol, which is a W3 standard that gives basic guidance on how a browser can expose itself for programmatic access.<\/p>\n<p>This WebDriver protocol also mandates an interface that is language-independent, so that the browser can be controlled externally via any programming language of your choice. To learn more about implementing this in automation, consider enrolling in a <a href=\"https:\/\/www.h2kinfosys.com\/courses\/selenium-automation-testing-certification-course\/\">Selenium certification<\/a> course for deeper insights and hands-on practice.<\/p>\n<p><span style=\"font-weight: 400;\">In a nutshell, Selenium WebDriver implementation says that by sending HTTP command requests you can control a web browser so that each command will perform something to direct the browser. This is exactly will do the same that Internet Explorer driver server does, which starts a server and then waits for the commands.<\/span><\/p>\n<h2><b>Download and Install Internet Explorer Driver<\/b><\/h2>\n<p><span style=\"font-weight: 400;\"><a href=\"https:\/\/en.wikipedia.org\/wiki\/Internet_Explorer\" rel=\"nofollow noopener\" target=\"_blank\">Internet Explorer<\/a> driver server is an executable file that needs to have in any one of your system paths before running your selenium tests. To download the latest version of Internet Explorer Driver we need to follow the below steps:<\/span><\/p>\n<p><b>Step1:<\/b><span style=\"font-weight: 400;\"> Go to the official website of Internet Explorer driver (<\/span><span style=\"font-weight: 400;\">https:\/\/www.selenium.dev\/downloads\/<\/span><span style=\"font-weight: 400;\">) and download the appropriate version for Internet Explorer driver based on your operating system.<\/span><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"wp-image-2675 aligncenter\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_1.png\" alt=\"\" width=\"702\" height=\"139\" title=\"\"><\/p>\n<p><strong>Note:<\/strong> Based on your Windows Operating System, you need to download the corresponding IE Driver of Windows version. Here we are working on the Windows Operating system; you need to download the Windows version IE driver. If your operating system is Mac or Linux then you need to download the corresponding Internet Explorer driver which is compatible with your test environment.<br \/><strong>Step2:<\/strong> Download 32 bit Windows IE or 64 bit Windows IE based on your Operating System to download IE driver for Windows Operating System.<\/p>\n<p><img decoding=\"async\" class=\"wp-image-2676 aligncenter\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_2.png\" alt=\"\" width=\"652\" height=\"143\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_2.png 730w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_2-300x66.png 300w\" sizes=\"(max-width: 652px) 100vw, 652px\" \/><\/p>\n<p><b>Step3:<\/b><span style=\"font-weight: 400;\"> Extract the ZIP file, once the ZIP file download is complete.<\/span><\/p>\n<p><img decoding=\"async\" class=\"wp-image-2677 aligncenter\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_3.png\" alt=\"\" width=\"664\" height=\"62\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_3.png 760w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_3-300x28.png 300w\" sizes=\"(max-width: 664px) 100vw, 664px\" \/><\/p>\n<p><b>Step4: <\/b> <span style=\"font-weight: 400;\">To instantiate the driver, you need to note down the location where you extracted the IE Driver.<\/span><\/p>\n<h2><b>Points to remember when working with IE browser<\/b><\/h2>\n<h3><b>Below are the two points to remember when working with IE browser<\/b><\/h3>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The Zoom level should be set to 100%<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">The Protected mode should be turned off and make a level to least positions ie to the bottom down position.<\/span><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">Using Selenium WebDriver, we may fail to launch an IE driver when we run your Selenium WebDriver Scripts in the Internet Explorer browser. When you won\u2019t set above two points you may face below two errors when you run your Selenium WebDriver Scripts in the IE browser.<\/span><\/p>\n<h2><b>Failed to Launch the Internet Explorer Driver using Selenium WebDriver<\/b><\/h2>\n<p>Running Tests on Selenium can sometimes present challenges, especially when users attempt to launch an IE driver using Selenium WebDriver. These issues are common, but with the right configurations, they can be resolved. To overcome these frequent obstacles, here are solutions to the issues that many users encounter, helping ensure a smooth and successful test execution on Internet Explorer.<\/p>\n<h3><b>Error 1:<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Exception in thread\u00a0<\/span><b><i>\u201cmain\u201d org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching in the Internet Explorer.<\/i><\/b><span style=\"font-weight: 400;\">\u00a0In the Internet Explorer browser for all zones Protected Mode settings are not the same. The same value must be set for all the zones in the Protected Mode.<\/span><\/p>\n<h3><b>Solution:<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">To resolve the above error, we need to enable the protected mode and the mode should be turned off and make a level to least positions i.e to bottom down position for all the zones.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Follow the below steps to enable protected mode for all the zones.<\/span><\/p>\n<p><b>Step 1: <\/b><span style=\"font-weight: 400;\">Open the <\/span><b>Internet Explorer<\/b><\/p>\n<p><b>Step 2: <\/b><span style=\"font-weight: 400;\">Go to <\/span><b>Tools<\/b><span style=\"font-weight: 400;\"> option and Click on <\/span><b>Internet Options<\/b><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2679 aligncenter\" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_5.png\" alt=\"\" width=\"349\" height=\"399\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_5.png 397w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_5-262x300.png 262w\" sizes=\"(max-width: 349px) 100vw, 349px\" \/><\/p>\n<p><b>Step 3: <\/b><span style=\"font-weight: 400;\">Select <\/span><b>Security<\/b><span style=\"font-weight: 400;\"> Tab<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2680 \" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_6.png\" alt=\"\" width=\"409\" height=\"360\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_6.png 529w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_6-300x265.png 300w\" sizes=\"(max-width: 409px) 100vw, 409px\" \/><\/p>\n<p><b>Step 4: <\/b><span style=\"font-weight: 400;\">Choose\u00a0<\/span><b>Internet option <\/b><span style=\"font-weight: 400;\">in\u00a0<\/span><b>Select a zone to view or change security settings<\/b><span style=\"font-weight: 400;\">\u00a0and select the checkbox of\u00a0<\/span><b>Enable protected mode<\/b><span style=\"font-weight: 400;\">\u00a0(requires restarting Internet Explorer).<\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2681 \" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_7.png\" alt=\"\" width=\"409\" height=\"514\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_7.png 559w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_7-239x300.png 239w\" sizes=\"(max-width: 409px) 100vw, 409px\" \/><\/p>\n<p><b>Step 5:<\/b><span style=\"font-weight: 400;\">\u00a0Similarly for other three options\u00a0<\/span><b>Local Intranet, Trusted sites, and Restricted sites, <\/b><span style=\"font-weight: 400;\">select the checkbox of\u00a0<\/span><b>Enable protected mode\u00a0<\/b><span style=\"font-weight: 400;\">(requires restarting Internet Explorer) <\/span><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2682 \" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_8.png\" alt=\"\" width=\"397\" height=\"522\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_8.png 512w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_8-228x300.png 228w\" sizes=\"(max-width: 397px) 100vw, 397px\" \/><\/p>\n<h3><b>Error 2:<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Exception in thread\u00a0<\/span><b><i>\u201cmain\u201d org.openqa.selenium.remote.SessionNotFoundException: Unexpected error launching in the Internet Explorer.<\/i><\/b><span style=\"font-weight: 400;\">\u00a0The browser zoom level was set to 200%. It should be set to 100%<\/span><\/p>\n<h3><b>Solution:<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">To fix the above error, we need to set the Zoom level to 100% of the Internet Explorer browser.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Follow the below steps to set the Zoom level to 100%.<\/span><\/p>\n<p><b>Step 1:<\/b><span style=\"font-weight: 400;\">\u00a0Open\u00a0the <\/span><b>Internet Explorer<\/b><\/p>\n<p><b>Step 2:<\/b><span style=\"font-weight: 400;\">\u00a0Go to <\/span><b>Tools<\/b><span style=\"font-weight: 400;\">\u00a0menu \u2013\u00a0<\/span><b>Select Zoom (100%) \u2013 Select 100%<\/b><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-2683 \" src=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_9.png\" alt=\"\" width=\"417\" height=\"327\" title=\"\" srcset=\"https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_9.png 622w, https:\/\/www.h2kinfosys.com\/blog\/wp-content\/uploads\/2020\/04\/Screenshot_9-300x235.png 300w\" sizes=\"(max-width: 417px) 100vw, 417px\" \/><\/p>\n<h2><b>Launching Internet Explorer browser using Selenium WebDriver<\/b><\/h2>\n<h3><b>Setting up the webdriver.ie.driver property<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Selenium WebDriver has a class called InternetExplorerDriver which is used to launch and control the Internet Explorer browser. The code to launch IE Driver is the same as you launch a ChromeDriver and <a href=\"https:\/\/www.h2kinfosys.com\/blog\/webdriver-script-java-example\/\">GeckoDriver<\/a>. All you need to set a system property \u201c<\/span><b>webdriver.ie.driver<\/b><span style=\"font-weight: 400;\">\u201d to the path of executable file \u201c<\/span><b>IEDriverServer.exe<\/b><span style=\"font-weight: 400;\">\u201c. If you haven\u2019t done this, you will face an error \u201c<\/span><i><span style=\"font-weight: 400;\">The path to the driver executable must be set by the webdriver.ie.driver system property<\/span><\/i><span style=\"font-weight: 400;\">\u201c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Let&#8217;s create a test case in which we will automate the following scenarios to handle Drop-downs:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Invoke a Google chrome browser.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Open URL: <\/span><a href=\"https:\/\/www.facebook.com\/\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">https:\/\/www.facebook.com\/<\/span><\/a><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Print the Title of the webpage.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Close the browser.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Now, we will create a test case step by step in order to understand of how to handle drop-downs in WebDriver.<\/span><\/p>\n<p><b>Step 1:<\/b><span style=\"font-weight: 400;\"> Launch Eclipse IDE.<\/span><\/p>\n<p><b>Step 2:<\/b><span style=\"font-weight: 400;\"> Go to File &gt; New &gt; Click on Java Project.<\/span><\/p>\n<p><b>Step 3:<\/b><span style=\"font-weight: 400;\"> Right click on the Project Name and click on the New &gt; class.<\/span><\/p>\n<p><b>Name: <\/b><span style=\"font-weight: 400;\">InternetExplorerTest<\/span><\/p>\n<p><b>Step 4:<\/b><span style=\"font-weight: 400;\"> Invoke the Google Chrome browser and set the system property to the path of your chromedriver.exe file.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Here is the sample code to set Chrome driver system property:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><em>\/\/ System Property for Chrome Driver<\/em><br \/><\/span><span style=\"font-weight: 400;\">System.setProperty(<\/span><span style=\"font-weight: 400;\">&#8220;webdriver.chrome.driver&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span> <span style=\"font-weight: 400;\">\u201c<\/span><span style=\"font-weight: 400;\"> D:\\\\Drivers\\\\geckodriver.exe<\/span><span style=\"font-weight: 400;\"> &#8220;<\/span><span style=\"font-weight: 400;\">);\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">After that we have to initialize the Chrome driver using <a href=\"https:\/\/www.h2kinfosys.com\/blog\/chrome-options-desired-capabilities\/\">ChromeDriver <\/a>Class.<\/span> <span style=\"font-weight: 400;\">Below is the sample code to initialize Chrome driver using ChromeDriver class.<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><em>\/\/ Instantiate a ChromeDriver class.<\/em><br \/><\/span><span style=\"font-weight: 400;\">WebDriver driver=new ChromeDriver();\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We will get the below code to launch Google Chrome browser after combining both of the above codes.<br \/><\/span><span style=\"font-weight: 400;\">System.setProperty(<\/span><span style=\"font-weight: 400;\">&#8220;webdriver.chrome.driver&#8221;<\/span><span style=\"font-weight: 400;\">,<\/span> <span style=\"font-weight: 400;\">\u201c<\/span><span style=\"font-weight: 400;\"> D:\\\\Drivers\\\\geckodriver.exe<\/span><span style=\"font-weight: 400;\"> &#8220;<\/span><span style=\"font-weight: 400;\">);<br \/><\/span><span style=\"font-weight: 400;\">WebDriver driver=new ChromeDriver();\u00a0\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">After that we need to navigate to the desired URL.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Below is the sample code to navigate to the desired URL:<\/span><\/p>\n<p><span style=\"font-weight: 400;\"><em>\/\/ Launch Website<\/em><br \/><\/span><span style=\"font-weight: 400;\">driver.navigate().to(&#8220;<\/span><a href=\"https:\/\/www.facebook.com\/\" rel=\"nofollow noopener\" target=\"_blank\"><span style=\"font-weight: 400;\">https:\/\/www.facebook.com\/<\/span><\/a><span style=\"font-weight: 400;\">&#8220;);\u00a0<\/span><\/p>\n<p><strong>Here is the complete code for the above scenario:<\/strong><\/p>\n<pre><span style=\"font-weight: 400;\">import org.openqa.selenium.WebDriver;\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">import org.openqa.selenium.chrome.ChromeDriver;\u00a0\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">public class InternetExplorerTest{\u00a0\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0public static void main(String[] args) {\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ System Property for Chrome Driver\u00a0\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0System.setProperty(<\/span><span style=\"font-weight: 400;\">\"webdriver.chrome.driver\"<\/span><span style=\"font-weight: 400;\">,<\/span> <span style=\"font-weight: 400;\">\u201c<\/span><span style=\"font-weight: 400;\"> D:\\\\Drivers\\\\geckodriver.exe<\/span><span style=\"font-weight: 400;\"> \"<\/span><span style=\"font-weight: 400;\">);\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ Instantiate a ChromeDriver class.\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0WebDriver driver=new ChromeDriver();\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\/\/ Launch Website\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">driver.navigate().to(\"<\/span><span style=\"font-weight: 400;\">https:\/\/www.facebook.com\/<\/span><span style=\"font-weight: 400;\">\");\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}\u00a0\u00a0\u00a0\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">}\u00a0 <\/span><\/pre>\n<p><b>Step 5:<\/b><span style=\"font-weight: 400;\"> Print the Title of the webpage<\/span><\/p>\n<p><b>Step 6: <\/b><span style=\"font-weight: 400;\">Close the driver<\/span><\/p>\n<p><b>Below is the program to launch the Internet Explorer Driver<\/b><\/p>\n<pre><span style=\"font-weight: 400;\">package com.testing.selenium.InternetExplorer;<\/span>\n\n<span style=\"font-weight: 400;\">import org.openqa.selenium.WebDriver;<\/span>\n\n<span style=\"font-weight: 400;\">import org.openqa.selenium.ie.InternetExplorerDriver;<\/span>\n\n<span style=\"font-weight: 400;\">public class InternetExplorerTest {<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0public static void main(String[] args) {<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0System.setproperty(\"Webdriver.ie.driver\",\"D:\\\\Drivers\\\\IEDriverServer.exe\");<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0WebDriver driver = new InternetExplorerDriver();<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0driver.get(\"https:\/\/facebook.com\");<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0String PageTitle = driver.getTitle();<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0System.out.println(\"Page Title is:\" + PageTitle);<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0driver.close();<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0}<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0}<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">When you run the above program it will open the <\/span><b>facebook.com <\/b><span style=\"font-weight: 400;\">website in the new Internet Explorer window and print the website title in the console.<\/span><\/p>\n<h2><b>Internet Explorer Options<\/b><\/h2>\n<ol>\n<li><b>requireWindowFocus():\u00a0<\/b><\/li>\n<\/ol>\n<p><span style=\"font-weight: 400;\">This option configures whether to require the IE window to have input focus before performing any user interactions like mouse or keyboard events.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Parameters: <\/span><i><span style=\"font-weight: 400;\">require\u00a0<\/span><\/i><span style=\"font-weight: 400;\">boolean\u00a0<\/span><span style=\"font-weight: 400;\">Whether to require window focus.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Returns <a href=\"https:\/\/www.selenium.dev\/\" rel=\"nofollow noopener\" target=\"_blank\">Options<\/a><br \/>A self reference.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Source:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">requireWindowFocus(require) {<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0this.options_[key.REQUIRE_WINDOW_FOCUS] = ! ! require;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0return this;<\/span>\n\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<p><b>2. ignoreZoomSetting():<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Indicates whether to check that the browser\u2019s zoom level is set to 100%<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Parameters: ignore Boolean<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Whether to ignore the browser\u2019s zoom level settings.<\/span><\/p>\n<p>Returns:\u00a0<a href=\"https:\/\/www.selenium.dev\/\" rel=\"nofollow noopener\" target=\"_blank\">Options<\/a><br \/>A self reference.<\/p>\n<p><span style=\"font-weight: 400;\">Source:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">ignoreZoomSetting(ignore) {<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0this.options_[key.IGNORE_ZOOM_SETTING] = ! ! ignore;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0return this;<\/span>\n\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<p><b>3. Options.ie():<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Parameters: None<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Returns: Capabilities<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0A basic set of capabilities for Internet Explorer<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">@return {!Capabilities}\u00a0 A basic set of capabilities for Internet Explorer.<\/span>\n\n<span style=\"font-weight: 400;\">static ie() {<\/span>\n\n<span style=\"font-weight: 400;\">return new Capabilities().setBrowserName(Browser.INTERNET_EXPLORER);<\/span>\n\n<span style=\"font-weight: 400;\">}<\/span><\/pre>\n<p><b>4. setPageLoadStrategy:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Sets the desired page loading strategy for a new WebDriver session.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Source:<\/span><\/p>\n<pre>Sets the desired page loading strategy for a new WebDriver session.\n\n@param {PageLoadStrategy} strategy the desired strategy\n\n@return {!Capabilities} a self reference\n\nsetPageLoadStrategy(strategy) {\n\nreturn this.set(Capability.PAGE_LOAD_STRATEGY, strategy);\n\n}<\/pre>\n<p><b>5. setProxy:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Sets the proxy configuration for this instance<\/span><\/p>\n<pre>@param {proxy.Config} proxy The desired proxy configuration\n\n@return {!Capabilities} A self reference\n\nsetProxy(proxy) {\n\nreturn this.set(Capability.PROXY, proxy);\n\n}<\/pre>\n<p><b>6. setExtractpath:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Set the path of the temporary data directory to use.<\/span><\/p>\n<pre>@param {string} path the log file path\n@return {!Options} A self reference\nsetExtractPath(path) {\n\nthis.options_[Key.EXTRACT_PATH] = path;\n\nreturn this;\n\n}<\/pre>\n<p><b>7. setHost:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Sets the IP address of the driver\u2019s host adapter<\/span><\/p>\n<pre>@param {string} host the IP address to use\n@return {!Options} A self reference\n\nsetHost(host) {\n\nthis.options_[Key.HOST] = host;\n\nreturn this;\n\n}<\/pre>\n<p><strong>8. setLogFile:<\/strong><br \/>Sets the path to the log file the driver should log to.<\/p>\n<pre>@param {string} file The log file path.\n\n@return {!Options} A self reference.\n\nsetLogFile(file) {\n\nthis.options_[Key.LOG_FILE] = file;\n\nreturn this;\n\n}<\/pre>\n<p><strong>9. setLogLevel:<\/strong><\/p>\n<p>Set the IEDriverServer&#8217;s logging {@linkplain Level level}.<\/p>\n<pre><span style=\"font-weight: 400;\">@param {Level} level The logging level.<\/span>\n\n<span style=\"font-weight: 400;\">@return {!Options} A self reference.<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span>\n<span style=\"font-weight: 400;\">\u00a0\u00a0setLogLevel(level) {<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0this.options_[Key.LOG_LEVEL] = level;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0return this;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0}<\/span><\/pre>\n<p><b>10. initialBrowserURL:<\/b><\/p>\n<p><span style=\"font-weight: 400;\">Sets the initial URL loaded when IE starts.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">@param {string} url The initial browser URL.<\/span>\n\n<span style=\"font-weight: 400;\">@return {!Options} A self reference.<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0<\/span><span style=\"font-weight: 400;\">\u00a0\u00a0initialBrowserUrl(url) {<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0this.options_[Key.INITIAL_BROWSER_URL] = url;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0return this;<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0}<\/span><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>In conclusion, running tests on Selenium using the Internet Explorer browser requires careful setup due to IE\u2019s unique handling of web elements and compatibility considerations. By using the IE Driver Server, Selenium enables automation on Internet Explorer, even though the browser lacks a native Java API. Ensuring correct configurations such as setting security levels, managing protected mode, and handling pop-ups is essential for stable test execution on IE. <\/p>\n\n\n\n<p>While IE is less commonly used than other browsers, it remains critical for testing applications in environments where compatibility is a priority. Mastering these configurations and understanding IE-specific behaviors can improve the reliability of automated tests, making your Selenium testing suite versatile across different browser platforms.<\/p>\n\n\n\n<p>Ready to master running tests on Selenium using the Internet Explorer browser? Join H2K Infosys and gain hands-on experience in configuring and executing tests across different browsers, including Internet Explorer. Our expert-led Selenium certification courses provide in-depth training, covering everything from IE Driver Server setup to handling unique IE challenges in test automation. Elevate your skills and ensure your test suite is compatible across various browsers, preparing you for real-world projects. Enroll today with H2K Infosys to become a skilled Selenium automation professional!<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Running Tests on Selenium in Internet Explorer is quite easy. We have to communicate with Internet Explorer to launch Internet Explorer through Internet Explorer driver. Internet Explorer Driver Server Internet Explorer Driver Server is a link between your selenium scripts and the Internet Explorer browser. You won\u2019t be able to communicate with the Internet Explorer [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2689,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[551,552,378,448],"class_list":["post-2674","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-selenium-tutorials","tag-internet-explorer","tag-running-tests-on-selenium","tag-selenium-testing","tag-selenium-webdriver"],"_links":{"self":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/2674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/comments?post=2674"}],"version-history":[{"count":0,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/posts\/2674\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media\/2689"}],"wp:attachment":[{"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/media?parent=2674"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/categories?post=2674"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.h2kinfosys.com\/blog\/wp-json\/wp\/v2\/tags?post=2674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}