Search code examples
seleniumselenium-chromedrivermicrosoft-edgeremote-debugging

How to turn off remote debugging to open this site in IE?


I am automating an application in Microsoft Edge browser on Windows 11 system. How can I remove that from running browser instance. I also checked similar question asked on stackoverflow but didnt get much help to overcome this banner.

Turn off remote debugging to open this site in internet explorer mode. Otherwise, it might not work as expected

Environment Used : Windows 11

Microsoft Edge : 105.0.1343.42

Selenium : 3.141.59

BaseDriver.Java

else if (browser.equalsIgnoreCase("edge")) {
                System.setProperty("webdriver.edge.driver",
                        FileReaderManager.getInstance().getConfigReader().getDriverPath() + "/msedgedriver.exe");
                capabilities = DesiredCapabilities.edge();
                // Creating an object of EdgeDriver
                driver = new EdgeDriver();
                driver.manage().window().maximize();

                // Deleting all the cookies
                driver.manage().deleteAllCookies();

                // Specifiying pageLoadTimeout and Implicit wait
                driver.manage().timeouts().pageLoadTimeout(40, TimeUnit.SECONDS);
                driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
            }

POM.XML

<project xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>ChromeTest.com</groupId>
    <artifactId>ChromeTest</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <dependencies>
    <!--    <dependency>
            <groupId>com.github.2gis.winium</groupId>
            <artifactId>winium-elements-desktop</artifactId>
            <version>0.2.0-1</version>
        </dependency> -->

        <dependency>
            <groupId>com.github.2gis.winium</groupId>
            <artifactId>winium-webdriver</artifactId>
            <version>0.1.0-1</version>
        </dependency>
        

          <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>3.141.59</version>
        </dependency>  

    <!--     <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>4.0.0-beta-4</version>
        </dependency> -->
    </dependencies> 



</project>

Please refer attached screen shot for your reference

enter image description here


Solution

  • From your description, I think you have configured the site in IE mode site list and tried to automate it in IE mode. It's the expected behavior that you see the error message because you're not using the right way to automate IE mode in Edge.

    The right way to automate IE mode in Edge is using IE Driver instead of Edge Driver. For the detailed steps, please follow this guide: Use Internet Explorer Driver to automate IE mode in Microsoft Edge.