t.me/atinfo_chat Telegram группа по автоматизации тестирования

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

Теги: #<Tag:0x00007f9b04234cf8> #<Tag:0x00007f9b04234ac8>

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

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

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

Test  tests/acceptance/WelcomeCept.php
Can't connect to Webdriver at 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
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
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
Usage: [options]
–version, -version
Displays the version and exits.
Default: false
in seconds : number of seconds a browser session is allowed to
hang while a WebDriver command is running (example: driver.get(url)). If
timeout is reached while a WebDriver command is still processing, the ses
will quit. Minimum value is 60. An unspecified, zero, or negative value m
wait indefinitely.
Default: 0
: 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.
filename : the filename to use for logging. If omitted, will log

   to STDOUT
   <Integer> : the port number the server will use.
   Default: 4444
   <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
used to take care of client crashes. For grid hub/node roles, cleanUpCycl
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.

at org.openqa.grid.selenium.GridLauncherV3$1.launch(GridLauncherV3.java:
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
at org.seleniumhq.jetty9.server.AbstractNetworkConnector.doStart(Abstrac
at org.seleniumhq.jetty9.server.ServerConnector.doStart(ServerConnector.
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(Abstract
at org.seleniumhq.jetty9.server.Server.doStart(Server.java:431)
at org.seleniumhq.jetty9.util.component.AbstractLifeCycle.start(Abstract
at org.openqa.selenium.remote.server.SeleniumServer.boot(SeleniumServer.
… 2 more

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


2 Симпатий

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

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

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

3 Симпатий