Что сделать, чтобы Codeception не ругался на selenium сервер?

Или что-то делаю неправильно? Тесты запускаются на сайте - это понятно, селениум-сервер - на своем (локальном) компьютере. Так?

Скачал и запустил сервер
java -jar selenium-server-standalone-3.2.0.jar

Запускаю тест, и получаю в ответ:

Test  tests/acceptance/WelcomeCept.php
Can't connect to Webdriver at http://127.0.0.1:4444/wd/hub. Please make sure that Selenium Server or PhantomJS is running.

Ну и что ему надо? Может в сервере что-нибудь нехватает?

C:\Users\User>java -jar D:\Dawnloads\selenium-server-standalone-3.2.0.jar
23:03:31.047 INFO - Selenium build info: version: ‘3.2.0’, revision: ‘8c03df6’
23:03:31.048 INFO - Launching a standalone Selenium Server
2017-03-09 23:03:31.084:INFO::main: Logging initialized @481ms to org.seleniumhq
.jetty9.util.log.StdErrLog
23:03:31.196 INFO - Driver class not found: com.opera.core.systems.OperaDriver
23:03:31.198 INFO - Driver provider com.opera.core.systems.OperaDriver registrat
ion is skipped:
Unable to create new instances on this machine.
23:03:31.198 INFO - Driver class not found: com.opera.core.systems.OperaDriver
23:03:31.199 INFO - Driver provider com.opera.core.systems.OperaDriver is not re
gistered
23:03:31.212 INFO - Driver provider org.openqa.selenium.safari.SafariDriver regi
stration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform
=MAC}] does not match the current platform VISTA
2017-03-09 23:03:31.306:INFO:osjs.Server:main: jetty-9.2.20.v20161216
2017-03-09 23:03:31.369:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletC
ontextHandler@7cd62f43{/,null,AVAILABLE}
Usage: [options]
Options:
–version, -version
Displays the version and exits.
Default: false
-browserTimeout
in seconds : number of seconds a browser session is allowed to
hang while a WebDriver command is running (example: driver.get(url)). If
the
timeout is reached while a WebDriver command is still processing, the ses
sion
will quit. Minimum value is 60. An unspecified, zero, or negative value m
eans
wait indefinitely.
Default: 0
-debug
: enables LogLevel.FINE.
Default: false
-jettyThreads, -jettyMaxThreads
: max number of threads for Jetty. An unspecified, zero, or
negative value means the Jetty default value (200) will be used.
-log
filename : the filename to use for logging. If omitted, will log

   to STDOUT
-port
   <Integer> : the port number the server will use.
   Default: 4444
-role
   <String> options are [hub], [node], or [standalone].
   Default: standalone
-timeout, -sessionTimeout
   <Integer> in seconds : Specifies the timeout before the server
   automatically kills a session that hasn't had any activity in the last X

seconds. The
test slot will then be released for another test to use. This is typicall
y
used to take care of client crashes. For grid hub/node roles, cleanUpCycl
e
must also be set.
Default: 1800

java.lang.RuntimeException: java.net.BindException: Address already in use: bind

    at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.

java:149)
at org.openqa.grid.selenium.GridLauncherV3$1.launch(GridLauncherV3.java:
238)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:99)
Caused by: java.net.BindException: Address already in use: bind
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.Net.bind(Unknown Source)
at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source)
at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source)
at org.seleniumhq.jetty9.server.ServerConnector.open(ServerConnector.jav
a:298)
at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(Abstrac
tNetworkConnector.java:80)
at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.
java:236)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(Abstract
LifeCycle.java:68)
at org.seleniumhq.jetty9.server.Server.doStart(Server.java:431)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(Abstract
LifeCycle.java:68)
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.
java:147)
… 2 more

попробуйте обновиться

2 лайка

у вас вообще то сервер не запустился -

java.lang.RuntimeException: java.net.BindException: Address already in use: bind

Это означает что порт 4444 уже занят другим процессом

3 лайка