Edge in IE mode not working with IEDriverServer

Luca Migliorini Rodrigues Costa 15 Reputation points
2023-12-14T19:23:11.15+00:00

I was trying to automate Edge in IE mode using selenium IEDriverServer.exe. When the code runs, I get the error saying "The IEDriverServer version (4.14.0.0) detected in PATH at C:\Users\admin\PycharmProjects\TesteIE\IEDriverServer.exe might not be compatible with the detected iexplorer version (11.0. 19041.3636); currently, IEDriverServer 4.14.0 is recommended for iexplorer 11.*, so it is advised to delete the driver in PATH and retry" I would like to know if Microsoft provides the version recommended for automation, in this case "IEDriverServer 4.14. 0"

Automation approach:

Using the code example available on the Microsoft website. All prerequisites mentioned on the Selenium website have been met.

https://learn.microsoft.com/en-us/microsoft-edge/webdriver-chromium/ie-mode?tabs=c-sharp

Observation:

Even after adding the site to the list of trusted sites, it does not work.

System setup:

Operating system: Win 11 and tested on Win10 both with their updates checked

Edge Browser: 120.0.2210.61

IEDriver Version: 4.14.0.0

I didn't find the version repository.

Please let me know if anyone is facing the same problem and any solution for it, I look forward to your help.

Thanks in advance

Windows for business Windows Client for IT Pros User experience Other
Microsoft Security Intune Other
Microsoft Edge Microsoft Edge development
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. 康 王 0 Reputation points
    2024-03-14T07:47:36.03+00:00

    I got the same problem. And When I tried to search this message in selenium repo, I found this code:

    https://github.com/SeleniumHQ/selenium/blob/83083c63593f245ed82cfd9e43a17654d5f73a43/rust/src/lib.rs#L791-L818

    if use_driver_in_path { // <- only calculate when IEDriverServer.exe in PATH
        let version = driver_in_path_version.unwrap();
        let path = driver_in_path.unwrap();
        let major_version = self.get_major_version(&version)?;
    
        // Display warning if the discovered driver version is not the same as the driver in PATH
        if !self.get_driver_version().is_empty()
            && (self.is_firefox() && !version.eq(self.get_driver_version()))
            || (!self.is_firefox() && !major_version.eq(&self.get_major_browser_version()))
        {
            self.get_logger().warn(format!(
                "The {} version ({}) detected in PATH at {} might not be compatible with \
                the detected {} version ({}); currently, {} {} is recommended for {} {}.*, \
                so it is advised to delete the driver in PATH and retry",
                self.get_driver_name(),
                &version,
                path,
                self.get_browser_name(),
                self.get_browser_version(),
                self.get_driver_name(),
                self.get_driver_version(),
                self.get_browser_name(),
                self.get_major_browser_version()
            ));
        }
        self.set_driver_version(version.to_string());
        return Ok(PathBuf::from(path));
    }
    

    I think there is something wrong when matching major versions. And that causes a warn log. It is just a log, not a throw. So I think we can just ignore this log.

    Or we can put IEDriverServer.exe in a relative path. Then pass it to the code like this:

    service = webdriver.IeService('./IEDriverServer.exe')
    
    with webdriver.Ie(service=service) as driver:
        ...
    
    
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.