Hi people: I have the next situation.
I want to run automation with Selenium, specifically with Microsoft Edge on Mac.
I have installed Version 77.0.235.15 (Official build) Beta (64-bit)
Edgedriver: Version: 77.0.235.15
The rest of the browsers run with no drama, but Edgedriver fails.
System.setProperty("webdriver.edge.driver", Constants.EdgeDriverPath);
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary(Constants.EdgeDriverPath);
EdgeOptions edgeOptions = new EdgeOptions().merge(chromeOptions);
driver = new EdgeDriver(edgeOptions);
The error is the next:
Caused by: org.openqa.selenium.WebDriverException: unknown error: Microsoft Edge failed to start: exited abnormally.
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from MicrosoftEdge location src/test/resources/drivers/mac/msedgedriver is no longer running, so MSEdgeDriver is assuming that Microsoft Edge has crashed.)
Build info: version: '3.11.0', revision: 'e59cfb3', time: '2018-03-11T20:26:55.152Z'
System info: host: 'CL-IT00331', ip: '192.168.0.12', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.3', java.version: '1.8.0_211'
Driver info: driver.version: EdgeDriver
remote stacktrace: 0 msedgedriver 0x000000010bc29f99 msedgedriver + 8023961
Could you please help me?
Related
I have trouble running MS Edge test on MAC using Selenium Remote web driver.
I tried to set System property for edge binary as below:
dc = DesiredCapabilities.edge();
System.setProperty("webdriver.edge.driver", "/Users/username/Softwares/Work/jars/msedgedriver");
dc.setCapability("edge_binary","/Applications/Microsoft Edge Beta.app");
I checked that msedge driver version and version of MS Edge browser that I have installed.
Both are - 80.0.361.48
This is the log on Selenium node:
020-02-11 18:06:37.533:INFO:osjshC.ROOT:qtp1800659519-12: org.openqa.selenium.remote.server.WebDriverServlet-59309333: Initialising WebDriverServlet
18:06:37.551 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession#47c6497e
18:06:37.555 INFO - /session: Executing POST on /session (handler: BeginSession)
18:06:37.632 INFO - Capabilities are: Capabilities {MicrosoftEdge_binary: /Applications/Microsoft Edg..., browserName: MicrosoftEdge, platform: MAC, version: }
18:06:37.633 INFO - Capabilities {MicrosoftEdge_binary: /Applications/Microsoft Edg..., browserName: MicrosoftEdge, platform: MAC, version: } matched class org.openqa.selenium.remote.server.ServicedSession$Factory (provider: org.openqa.selenium.edge.EdgeDriverService)
Starting MSEdgeDriver 80.0.361.48 (e1a3ff36578e440880567e6adcbeab38ec2956fa) on port 31883
Only local connections are allowed.
Please protect ports used by MSEdgeDriver and related test frameworks to prevent access by malicious code.
Exception that I get when running code is as
org.openqa.selenium.WebDriverException: unknown error: cannot find MSEdge binary
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: '****-MacBook-Pro.local', ip: 'fe80:0:0:0:14d9:68c6:7d2c:87a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.2', java.version: '1.8.0_152'
Driver info: driver.version: unknown
This error message...
org.openqa.selenium.WebDriverException: unknown error: cannot find MSEdge binary
Build info: version: '3.7.1', revision: '8a0099a', time: '2017-11-06T21:07:36.161Z'
System info: host: '****-MacBook-Pro.local', ip: 'fe80:0:0:0:14d9:68c6:7d2c:87a%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.2', java.version: '1.8.0_152'
Driver info: driver.version: unknown
...implies that the program was unable to locate MSEdge binary within your system.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
Though you are using compatable versions of MS Edge Driver v80.0 and MS Edge Browser v80.0
Your Selenium Client version is 3.7.1 of 2017-11-06T21:07:36.161Z which is almost 2.5 years older.
But your JDK version is 1.8.0_152 which is pretty ancient.
So there is a clear mismatch between JDK v8u152 , Selenium Client v'3.7.1 , MS Edge Driver v80.0 and the MS Edge Browser v80.0
Solution
Ensure that:
JDK is upgraded to current levels JDK 8u241.
Selenium is upgraded to current levels Version 3.141.59.
Take a System Reboot.
Execute your #Test as non-root user.
I'm using a macOS, I installed the Edge webdriver on it, configured its path on my selenium framework
But I got this error:
org.openqa.selenium.WebDriverException: unknown error: cannot find Microsoft Edge binary
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'MacBook-Pro-de-Sabrine-2.local', ip: 'fe80:0:0:0:4c2:e6bc:d2ff:348c%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.14.5', java.version: '1.8.0_191'
Driver info: driver.version: EdgeDriver
So you are using MAC. The problem is that the browser needs to be installed on your system in order to run it.
So if somehow you have installed it use the below code:
Code:
System.setProperty("webdriver.edge.driver","/YOUR_PATH");
WebDriver driver = new EdgeDriver();
driver.get("http://www.google.com");
OR
System.setProperty("webdriver.edge.driver","YOUR_PATH");
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.setBinary("/YOUR_PATH");
EdgeOptions edgeOptions = new EdgeOptions().merge(chromeOptions);
WebDriver driver = new EdgeDriver(edgeOptions);
driver.get("http://www.google.com");
i am setting up a selenium based testing application. I am using chrome driver for testing.
I have set up a docker image as in the below URL.
https://github.com/Leafney/alpine-selenium-chrome/blob/master/Dockerfile
I have configured the chrome driver property as follows.
System.setProperty("webdriver.chrome.driver", "/usr/lib/chromium/chromedriver");
However, I get the below error informing that chrome failed to start.
Command duration or timeout: 60.07 seconds
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'c34db8dbfca2', ip: '172.17.0.2', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.27-moby', java.version: '1.8.0_151'
Driver info: driver.version: ChromeDriver
unknown error: Chrome failed to start: crashed
Any pointers on this will be helpful.
I had the same issue with Chromedriver and Alpine, Chromedriver is not executable at all, even I had tried to install and run almost every version of the Chromedriver, no luck.
And then I had to use Debian Linux in order to execute Chromedriver properly for e2e testing in docker and CI.
Not sure why we are getting this error on mac 10.12.4 while running the selenium, My chrome is running on latest version i.e. Version 58.0.3029.110 (64-bit) and Chrome driver is 2.9 and Selenium_java version is 2.53.
Anyone facing the same issue, is something i'm missing here or selenium is currently not supporting these configurations on mac Sierra. Any help much appreciated.
After this warning I'm getting this message, I'm running scripts using docker
[testng] Could not start a new session. Possible causes are invalid address of the remote server or browser start-up failure.
[testng] Build info: version: '2.43.1', revision: '5163bce', time: '2014-09-10 16:27:58'
[testng] System info: host: 'vbabu-in-la01', ip: '10.40.17.78', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_121'
[testng] Driver info: driver.version: RemoteWebDriver
Hi I apologise for a repost but I am new to selenium and tried to launch this simple command to open youtube in a google. However, it keeps crashing and showing this error. Directly below is the code I am running.
System.setProperty("webdriver.chrome.driver",
"C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe");
System.out.println(System.getProperty("webdriver.chrome.driver"));
WebDriver driver3 = new ChromeDriver();
driver3.get("https://www.youtube.com/");
Could anyone point me in the right direction of where I'm going wrong. Thank you
C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Exception in thread "main"
org.openqa.selenium.remote.UnreachableBrowserException: Could not start
a new session. Possible causes are invalid address of the remote server
or browser start-up failure.
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'nuigit450', ip: '192.168.16.22', os.name: 'Windows
7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_111'
Driver info: driver.version: ChromeDriver
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:622)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:241)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:128)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:141)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:174)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:163)
at org.openqa.selenium.chrome.ChromeDriver.<init>(ChromeDriver.java:120)
at TestWeb.main(TestWeb.java:22)
Caused by: java.lang.IllegalStateException: The process has not exited yet therefore no result is available ...
at org.apache.commons.exec.DefaultExecuteResultHandler.getException(DefaultExecuteResultHandler.java:76)
at org.openqa.selenium.os.UnixProcess.checkForError(UnixProcess.java:173)
at org.openqa.selenium.os.CommandLine.checkForError(CommandLine.java:185)
at org.openqa.selenium.remote.service.DriverService.waitUntilAvailable(DriverService.java:177)
at org.openqa.selenium.remote.service.DriverService.start(DriverService.java:166)
at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:78)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601)
... 7 more
Your webdriver.chrome.driver point to Chrome browser but it should point to chromedriver. For reference: https://sites.google.com/a/chromium.org/chromedriver/getting-started
You need to download chromedriver from here: https://sites.google.com/a/chromium.org/chromedriver/downloads and set path to this file in webdriver.chrome.driver.