- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to run Selenium tests on Internet Explorer browser?
We can run Selenium tests on the Internet Explorer browser with the help of the Selenium IE driver. It is an independent server that works on the protocols of the webdriver and serves as a communication between the Internet Explorer browser and the Selenium code.
First, we have to download the IEDriverServer.exe file from the following link − https://www.selenium.dev/downloads/.
Then click on the download link (32 or 64 bit) based on our local operating system.
Once the download is completed, a zip file gets saved. It needs to be extracted and stored in a location. After extracting it, the executable file - IEDriverServer.exe file is to be kept at a desired location.
We have to configure the path of the IEDriverServer.exe file using the System.setProperty method along with creating an object of the InternetExplorerDriver class.
Syntax
System.setProperty("webdriver.ie.driver", "C:\Users\ghs6kor\Desktop\Java\IEDriverServer.exe"); WebDriver driver = new InternetExplorerDriver();
Example
import org.openqa.selenium.WebDriver; import org.openqa.selenium.ie.InternetExplorerDriver; public class IEBrwserLaunch{ public static void main(String[] args) { //configure path of IEDriverServer.exe path System.setProperty("webdriver.ie.driver", "C:\Users\ghs6kor\Desktop\Java\IEDriverServer.exe"); //object of InternetExplorerDriver WebDriver driver = new InternetExplorerDriver(); //URL launch driver.get("https://www.yahoo.com/"); } }
Output
- Related Articles
- How to run Selenium tests on Chrome Browser using?
- What is Selenium Internet Explorer Driver or IE Driver?
- How to run Selenium tests in multiple browsers one after another from C# NUnit?
- How to enable JavaScript in Internet Explorer (IE)?
- How to disable JavaScript in Internet Explorer (IE)?
- What are the pre-conditions for Selenium Internet Explorer Driver or IE Driver?
- How can we debug JavaScript in Internet Explorer?
- How to fix Array indexOf() in JavaScript for Internet Explorer browsers?
- Using HP UFT GetCellData function on SAP Web Dynpro crash Internet Explorer
- How to enable / Disable Enhanced Protection Mode in Internet Explorer using PowerShell?
- How to run tests using a test runner file for Cucumber?
- How to block a website in your web browsers (Chrome and Internet Explorer)
- How to perform browser navigations in Selenium?
- How to maximize the browser in Selenium?
- How to launch Chrome Browser via Selenium?
