-1

I'm launch Microsoft Edge in IE mode using Selenium Java.

Can someone help me with the required configuration settings?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • Googling "selenium use edge in ie mode", this was literally the first hit: https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/ie-mode?tabs=java :( – SiKing Jul 29 '22 at 21:56

1 Answers1

0

To launch Microsoft Edge browser in IE mode and navigate to a website e.g. http://www.bing.com you can use the following configuration and settings:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.ie.InternetExplorerOptions;

public class IEDriverSample {
    public static void main(String[] args) {        
        InternetExplorerOptions ieOptions = new InternetExplorerOptions();
        ieOptions.attachToEdgeChrome();
        ieOptions.withEdgeExecutablePath("C:\\Program Files (x86)\\Microsoft\\Edge\\Application\\msedge.exe");
        WebDriver driver = new InternetExplorerDriver(ieOptions);
        driver.get("http://www.bing.com");
    }
}
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • This doesnt work either. i also referred the link https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/ie-mode?tabs=java. But its throwing me the error org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: Unexpected error launching Internet Explorer. IELaunchURL() returned HRESULT 80070002 ('The system cannot find the file specified.') for URL 'http://localhost:52310/' Build info: version: '4.1.1', revision: 'e8fcc2cecf' – Selenium Lover Jun 01 '23 at 15:31