- 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 can I download Microsoft WebDriver/Edge Driver to use with Selenium?
We can download Microsoft/Edge Driver to use with Selenium. The Microsoft Edge driver allows communication of the tests developed in Selenium with the Edge browser.
To download the msedgedriver.exe file, we have to first navigate to the following link − https://developer.microsoft.com/en-us/microsoftedge/tools/webdriver/#downloads
Then move to the Downloads section, and click on the link based on the local operating system and browser version we have.
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 - msedgedriver.exe file is to be kept at a desired location.
We have to configure the path of the msedgedriver.exe file using the System.setProperty method along with creating an object of the EdgeDriver class.
Syntax
System.setProperty("webdriver.edge.driver", "C:\Users\ghs6kor\Desktop\Java\msedgedriver.exe"); WebDriver driver = new EdgeDriver();
Example
import org.openqa.selenium.WebDriver; import org.openqa.selenium.edge.EdgeDriver; import org.openqa.selenium.Capabilities; import org.openqa.selenium.remote.RemoteWebDriver; public class EdgeBrwserLaunch{ public static void main(String[] args) { //configure path of msedgedriver.exe path System.setProperty("webdriver.edge.driver", "C:\Users\ghs6kor\Desktop\Java\msedgedriver.exe"); //object of EdgeDriver WebDriver driver = new EdgeDriver(); //URL launch driver.get("https://www.yahoo.com/"); //get browser name Capabilities c = ((RemoteWebDriver) driver).getCapabilities(); System.out.println("Browser: " + c.getBrowserName()); driver.quit(); } }
Output
- Related Articles
- How to launch Edge browser with Selenium Webdriver?
- How to Download & Install Selenium WebDriver?
- How to use chrome webdriver in Selenium to download files in Python?
- How do you automatically download a Pdf with Selenium Webdriver in Python?
- How can I close a specific window using Selenium WebDriver with Java?
- How can I get Webdriver Session ID in Selenium?
- How do I download Selenium RC?
- How does Selenium Webdriver handle the SSL certificate in Edge?
- How can I handle multiple keyboard keys using Selenium Webdriver?
- Why does the Selenium WebDriver have an edge over Selenium RC?
- How can I download a file on a click event using selenium?
- How to use Selenium WebDriver for Web Automation?
- How to use Selenium webdriver to click google search?
- How to download any file and save it to the desired location using Selenium Webdriver?
- How to use clickandwait in Selenium Webdriver using Java?
