我对设置 Selenium 和 Mink 并不陌生,但它似乎总是很麻烦。这次我尝试在 ubuntu docker 容器中设置它,但遇到了以下错误:
Could not open connection: Unable to create new service: ChromeDriverService
Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z'
System info: host: 'a75b4026b8e5', ip: '172.20.0.6', os.name: 'Linux', os.arch: 'amd64', os.version: '4.9.60-linuxkit-aufs', java.version: '1.8.0_161'
Driver info: driver.version: unknown (Behat\Mink\Exception\DriverException)
Run Code Online (Sandbox Code Playgroud)
我可以看出 Mink 在某种程度上影响了 Selenium,因为 Selenium 服务器在 Behat 报告上述错误之前立即输出以下内容:
2018-01-30 16:13:49.870:INFO:osjshC.ROOT:qtp1156060786-12: org.openqa.selenium.remote.server.WebDriverServlet-10bbd20a: Initialising WebDriverServlet
16:13:49.988 INFO - Found handler: org.openqa.selenium.remote.server.commandhandler.BeginSession@4b4945b7
16:13:50.006 INFO - /session: Executing POST on /session (handler: BeginSession)
16:13:50.168 INFO - Capabilities …Run Code Online (Sandbox Code Playgroud)