0

Code:

    EdgeOptions edgeoptions = new EdgeOptions();
    edgeoptions.addArguments("--remote-debugging-port=14837");
    edgeoptions.addArguments("--start-maximized");
    edgeoptions.addArguments("user-data-dir=C:\\Users\\jagadish\\AppData\\Local\\Microsoft\\Edge\\User Data");
    edgeoptions.addArguments("profile-directory=Profile 2");
    WebDriver driver = new EdgeDriver(edgeoptions);

Error:

Microsoft Edge WebDriver was started successfully.
Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Could not start a new session. Response code 500. Message: unknown error: Microsoft Edge failed to start: exited normally.
  (**chrome not reachable**)
  (The process started from msedge location C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe is no longer running, so msedgedriver is assuming that msedge has crashed.) 
Host info: host: 'JAGADISH-LAPTOP', ip: '192.168.1.105'
Build info: version: '4.7.2', revision: '4d4020c3b7'
System info: os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '17.0.1'
Driver info: org.openqa.selenium.edge.EdgeDriver
Command: [null, newSession {capabilities=[Capabilities {browserName: MicrosoftEdge, ms:edgeOptions: {args: [--remote-debugging-port=14837, --start-maximized, user-data-dir=C:\Users\jaga..., profile-directory=Profile 2], extensions: []}}], desiredCapabilities=Capabilities {browserName: MicrosoftEdge, ms:edgeOptions: {args: [--remote-debugging-port=14837, --start-maximized, user-data-dir=C:\Users\jaga..., profile-directory=Profile 2], extensions: []}}}]

test is running without switching the profile. Then i want to switch my profile and added the edge options, driver launched but throwed error "devtoolsactiveport file doesn't exist edge selenium".

found solution in https://stackoverflow.com/questions/66682566/ms-edge-driver-error-devtoolsactiveport-file-doesnt-exist-works-only-with and added --remote-debugging-port=14837. now i am facing chrome not reachable error.

1 Answers1

0

you can try to kill all edgedriver processes and try again

hexiao
  • 11
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Akzy Mar 22 '23 at 05:17