I am doing running all tests using PHPUnit. Created a wrapper that launches an instance of Apache, then starts the Selenium standalone server, then creates the Chrome Remote
This error message...
[exec] Facebook\WebDriver\Exception\WebDriverCurlException: Curl error thrown for http POST to /session with params: {"desiredCapabilities":{"browserName":"chrome","platform":"ANY","chromeOptions":{"binary":"","args":["--window-size=1400,900","--no-sandbox","--headless"]},"goog:chromeOptions":{"args":["--window-size=1400,900","--no-sandbox","--headless"]}}}
...implies that Curl error was thrown while initializing the Chrome Browser session.
Your main issue seems to be with the desiredCapability platform
being set as ANY
.
As per the platformName section of Processing capabilities - WebDriver W3C Living Document, the following platform names are in common usage with well-understood semantics and, when matching capabilities, greatest interoperability can be achieved by honoring them as valid synonyms for well-known Operating Systems:
Key System
--- ------
"linux" Any server or desktop system based upon the Linux kernel.
"mac" Any version of Apple’s macOS.
"windows" Any version of Microsoft Windows, including desktop and mobile versions.
Note:This list is not exhaustive.
When returning capabilities from New Session, it is valid to return a more specific platformName, allowing users to correctly identify the Operating System the WebDriver implementation is running on.
So instead of passing "platform":"ANY"
within the desiredCapabilities object, a more specific "platform":"windows"
will be more desirable approach.