Giter Club home page Giter Club logo

selenium-grid-extras's Introduction

Gitter

NOTICE - Looking for people to maintain this project. I (@smccarthy) does not have the time for now. If interested please contact me via an open issue or #selenium on the freenode network (or Slack). Thank you!

Selenium-Grid-Extras

Selenium Grid Extras is a project that helps you set up and manage your local Selenium Grid. Typical instances of the Grid consists of the HUB and Nodes. The HUB is responsible for managing test sessions and assigning new session idle nodes.

Setup of Grid Extras is made to be simple, just run the packaged JAR file and point the node at the HUB location, Grid Extras will take care of the rest for you. Here are the features you get by using Selenium Grid Extras vs Selenium Grid alone:

  • Ability to control individual grid nodes, following is an incomplete list of OS level tasks:
    • Killing any browser instance by name
    • Stopping any Process by PID
    • Moving mouse to specific location
    • Get Memory usage and disk statistics
  • Automatically upgrade WebDriver binaries
  • Restart node after a set number of test executions
  • Central storage of configurations for all nodes on the HUB server
  • Screenshots at the OS level
  • And much more.

Running

  1. On the initial execution, follow the "Setup Instructions" section.
  2. As part of the initial execution, a starter script start_grid_extras.sh or start_grid_extras.bat will be generated.
  3. After the initial execution, use the generated start script to start HUB or nodes thereafter.
    • This will help with automatic upgrades and downgrades
    • Be careul of putting the Selenium Grid Extras jar file in a directory with spaces. Doing so may cause issues. PR welcome to fix this.

Setup Instructions

Setup is simple, just download the Grid Extras Jar to get started from here: Download Latest

Setting up Grid Hub

  1. In the terminal run following command:
java -jar Selenium-Grid-Extras-Jar.jar
  1. You will be prompted with several questions, first one will ask you if you want to set this computer as a HUB, Node, or both. Answer 2 for HUB

  2. Leave the Host name for Grid Hub as default 127.0.0.1

  3. Set port to be used by Selenium Grid Hub, default is 4444

  4. You will be asked if you wish to auto update Selenium. If you answer yes, then every time Selenium Grid Extras is started it will check fo the latest version of Selenium Stand Alone Server, IEDriver, and ChromeDriver. If you choose to not auto update, you will be asked what versions of each driver to lock into.

Setting up Grid Node

  1. In the terminal run following command:
java -jar Selenium-Grid-Extras-Jar.jar
  1. You will be asked if you wish to use this computer as HUB or Node, select 1 for Node

  2. You will be asked for the host name of the HUB computer, type in the IP or hostname of the HUB computer

  3. When prompted for the port used by the HUB, enter that value

  4. Selenium Grid Extras will attempt to guess the Operating System of the current computer, if it's wrong please enter the correct value

  5. You will be asked what Browsers this Node will host, choose the ones that apply

  6. You will be asked how often to restart your whole computer. By default after 10 tests Selenium Grid Extras will attempt to restart the Node, provided the node is idle. Choose 0 if you do not wish to have the computer automatically restart.

  7. You will be asked if Selenium Grid Extras should automatically check for updates of IEDriver, ChromeDriver and Selenium Stand Alone Server. If you answer no, you will be asked what version to lock into.

  8. Finally, you will be asked if you wish to store all of the Node configs on the HUB. If you answer yes, Selenium Grid Extras will attempt to push Node's configs to the HUB. If it is successful, Selenium Grid Extras will attempt to download all of the configs from the HUB before it starts. This way all of the Node configs can be controlled directly from the HUB.

Changing the logging on the grid hub, nodes, or selenium-grid-extras

  1. For grid extras, create a log4j.properties in the same directory as your jar file. Start the service like : java -Dlog4j.debug -Dlog4j.configuration=file:log4j.properties -cp .:SeleniumGridExtras-1.10.0-SNAPSHOT-jar-with-dependencies.jar com.groupon.seleniumgridextras.SeleniumGridExtras (Use a semi-colon in the classpath for Windows. Use a colon in the classpath for Mac/Linux).
  2. For hub and node log files, add the following to the selenium_grid_extras_config.json file (see selenium_grid_extras_config.json.example for an example):
    "grid_jvm_options": {
    "selenium.LOGGER.level": "WARNING"
    },

Upgrading Grid Extras

There are 2 options available for un-attended upgrades

  1. Automatic upgrades can be achieved by selected "auto update" on the first run, or setting "grid_extras_auto_update" key to have value of "1" in selenium_grid_extras_config.json
  2. Manual upgrade trigger can be achieved by making an HTTP GET request against http://node_name:3000/upgrade_grid_extras?version=X.X.X

Auto Restarting Nodes

Starting with release 1.3.0 the nodes have an option of automatically restarting after a certain amount of builds have been executed and the node is currently not busy. This helps to keep the nodes in pristine state for longer periods of time, and clears up and browser crashes, which may have occurred. Some setup will be needed to make this feature work as intended.

  1. Setup default login user
  2. Setup default start up task
  3. Give permission to access OS.

Windows

  1. Follow Microsoft's Technical Help
  2. Add start up batch script to StartUp directory or set up a Scheduled Task to start the batch file automatically
  3. No need to setup permission as long as current user can run the following command in the Terminal
shutdown -r -t 1 -f

OS X

  1. Turn on Automatic Login option and make the desired user auto login
  2. Set up the shell script which starts Grid Extras to run automatically.
  3. Modify the /etc/sudoers to contain this line, where the $USER is the current user that will be used for running grid node.
$USER ALL=(ALL) NOPASSWD: /sbin/shutdown

Linux

  1. ...
  2. Set up the shell script which starts Grid Extras to run automatically.
  3. Modify the /etc/sudoers to contain this line, where the $USER is the current user that will be used for running grid node.
$USER ALL=(ALL) NOPASSWD: /sbin/shutdown

Starting Services

Note: Make sure to run Grid Extras at least once prior to setting it up as a service, so it can ask you the first run questions.

Windows

There are two major ways to make windows automatically start the Grid Extras binary

  • Insert a batch file into StartUp directory
  • Using the Task Scheduler to add the java start command, where the executable will be the path to java.exe and the path to Grid Extras passed in as an argument

Linux

There are a lot of security issues with setting up a cron job as a “build user” and letting that user run in the normal display desktop (DISPLAY=:0 aka the one you see when it is connected to the computer monitor). There is a work around to allow the service to run in DISPLAY=:0 but that’s not recommended.

Instead, it is a much better practice to set up a XVNC server on a Linux computer, with a light desktop manager (FluxBox seems to be a good lightweight choice http://fluxbox.org/). Once VNC server and desktop managers are installed, run the following command to start a virtual DISPLAY:

vncserver :1 -geometry 1024x768

This will start an XVNC server on DISPLAY=:1 with screen resolution of 1024x768. You can tweak these parameters as needed. Note: You might need to add a cron job to restart vncserver in similar fashion, since vncserver will not automatically start after reboot

After you have the virtual display running, add run this command to edit the cron list for current user (vi is the editor used)

crontab -e

Add following lines to the cron list:

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
*/5 * * * * bash -i -c 'cd WORKING_DIRECTORY; export DISPLAY=:1 java -jar SELENIUM_GRID_EXTRAS.jar' >> WORKING_DIRECTORY/log/log.out 2>&1

Where the WORKING_DIRECTORY needs to be replaced with the location where grid extras jar was downloaded, and SELENIUM_GRID_EXTRAS represents the name given to the grid extras jar. This cron will run every 5 minutes.

OS X

Download the SeleniumGridExtras.plist to your computer, open it in editor of choice.

Update the XML file replacing WORKING_DIRECTORY with the location of the selenium grid extras working directory Update the XML file replacing SELENIUM_GRID_EXTRAS.jar with the name Selenium Grid Extras was saved as

Move the com.groupon.SeleniumGridExtras.plist to ~/Library/LaunchAgents/

run

launchctl load ~/Library/LaunchAgents/com.groupon.SeleniumGridExtras.plist

Docker Images

https://github.com/viltgroup/docker-selenium-grid-extras provided by @mariolameiras . If you see any issues with these images please report them on the https://github.com/viltgroup/docker-selenium-grid-extras repo, and not this repo. These are new images, so please keep that in mind.

Contributing

For This project, add functionality, make sure all tests pass, send pull request.

Note: This product exposes your machine to the whole network, anyone on the network will be able to perform OS level task by simply hitting an HTTP url. There are no security measures at the moment, and at the moment no plans to add any security. You have been warned!

Link Backs

This project uses jWMI.java which was taken from www.henryranch.net

selenium-grid-extras's People

Contributors

asnir avatar dedmaroz avatar dima-groupon avatar dimacus avatar fkenji avatar ilyab avatar j1n6 avatar jvanbouchaute avatar lenny1806 avatar mattzajork avatar miyajan avatar nicegraham avatar pawelus avatar phasze avatar philhayward avatar pit3k avatar plessbd avatar ravishan avatar rgonalo avatar shankarkc avatar smccarthy avatar smccarthy-godaddy avatar thomascramer avatar xiaoxinghu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

selenium-grid-extras's Issues

Selenium Grid Extras not restarting after N tests

Hi Dima,

I'm running the last Grid Extras (v1.7.1) in a windows vm and in the configuration I set the restart of the vm at 10 tests.
Despite this, the vm is not restarting. In the logs there's no tracking information and I accumulate like 100+ sessions without a restart.
It seems not to be a browser bug related, because it fails for ie/chrome/firefox.

Thanks in advance

Asking to download a specific version of IEDriver via HTTP is ignored

Basically, the version and/or bit provided in http request is ignored in favor of the config json file. Need to investigate more.

Я увидел эту функцию в API и хотел её использовать, чтоб скачать другую версию драйвера (64 бит). В ответ я получил сообщение, что эта версия уже скачана. Оказалось, что проверка идёт не по заданным параметрам, а по конфигурации, которая читается 1 раз при запуске сервера. Я бы хотел более динамичный способ конфигурации версии драйвера (его битности).
Как ты считаешь, это резонно?

-Andrej

64 bit Internet Explorer Driver need to be downloaded

When I execute the jar file, it always download the 32 bit Internet Explorer Driver. But this driver is not compatible with 64 bit windows machine. In my code when I'm trying to create a new RemoteWebDriver, it always fails.

For a workaround i write my separate node.json file and download the 64 bit Internet Explorer Driver. It works fine.

Please look into the matter.

log4j:ERROR Failed to rename...

I'm seeing this constantly on the hub (using the latest 1.7.1 snapshot)

Selenium Grid Extras has been started!
Navigate to http://localhost:3000 for more details
log4j:ERROR Failed to rename [log//grid_extras.log] to [log//grid_extras.log.201
5-02-05].

Configuring Ubuntu 14.04 for service/ autorestart

Hello,

Could anyone share their configuration for how they got Ubuntu to start up the grid using Selenium-Grid-Extras upon reboot, headless? Specfiically the scripts used, permissions, etc. I'm running into this issue where Selenium-Grid-Extras does startup, there's pid associated with it, it's in Xvfb, that is also running, but it's not registering to the grid (so it looks to be stuck in some prompt state); however, when I launch the same scripts from say /etc/init.d/selenium without involving Xvfb after logging in (I'm root) it launches without issue and registeres to the hub... Any tips would be greatly appreciated :)

cktech

Question: configuation options per node or hub roles

Hi,
to me it's not always clear :

  • where the different configuration options should be defined (in the hub role or node role config)
  • description of the different configuration options and in what unit they should be expressed (ms / secs / MB)

Some extra documentation could clarifiy a lot the configuration parameters.
Thanks in advance.

Great job BTW. This project is a life / deadline saver ...

High Availability Hub

Hi,

I wonder if there are any existing ways to make the Hub stateless to achieve HA?

Thanks

Unresponsive GridExtras Servlet

Hello,

I'm finding that the Grid Extras servlet running on port 3000 responds fine only until I run a test on the given node. Once a test is run on that node, all attempts to connect to the web page time out. The grid is still registered with the hub and can run tests, but the Grid Extras capabilities are not available. Is this something that anyone has seen before?

Also, I tried setting the restart after N tests setting to 1 to work around this, but it seems to be ignored (I believe there is a separate issue logged for this). I do not see any errors in the log in my case though, it just simply does not restart.

Thanks,
ray

"videos_to_keep": "10" on HUB doesn't work (just deleted 30GB+, 1500 videos)

"video_recording_options": {
  "height": "768",
  "frameSeconds": "1",
  "idle_video_timeout": "120",
  "frames": "5",
  "title_frame_font_color": "129,182,64,128",
  "lower_third_background_color": "0,0,0,200",
  "width": "1024",
  "lower_third_font_color": "255,255,255,255",
  "video_output_dir": "video_output",
  "record_test_videos": "true",
  "videos_to_keep": "10"
},

enhancement: record videos only for failed tests

hi dima,
Would be nice if I can see videos only for failed tests. I don't have a reason to watch tests which have been passed.
And, is there a way to my recorded videos have a "friendly" name (same as executed test)? In order to see my failed test I need to watch all of them.
thanks

Exception thrown related to videorec / node becomes blocked

Hi,

V 1.5.0
sometimes I see the following entries showing in the log window :

image

Nothing specific in the log files though :

10 okt 2014 08:57:08 [main] INFO seleniumgridextras.SeleniumGridExtras - Loaded Grid Logger from log4j.properties
10 okt 2014 08:57:08 [main] INFO remote.ConfigPuller - Config file storing central repository URL is D:\tools\SeleniumGrid\configs\central_config_repo_config.txt
10 okt 2014 08:57:08 [main] INFO remote.ConfigPuller - Config file for central repo does not exist D:\tools\SeleniumGrid\configs\central_config_repo_config.txt
10 okt 2014 08:57:08 [main] INFO remote.ConfigPuller - Central config URL for current node is set to ''
10 okt 2014 08:57:08 [main] INFO remote.ConfigPuller - The central config URL is empty, will not download the latest configs.
10 okt 2014 08:57:09 [main] INFO grid.SelfHealingGrid - GridExtras is not running will boot normally
10 okt 2014 08:57:10 [main] INFO seleniumgridextras.SeleniumGridExtras - Initializing Task Modules
10 okt 2014 08:57:10 [main] INFO tasks.Setup - Setup Tasks
10 okt 2014 08:57:10 [main] INFO tasks.Teardown - Tear-Down Tasks
10 okt 2014 08:57:10 [main] INFO tasks.Teardown - SessionCounterStopSession
10 okt 2014 08:57:10 [main] INFO tasks.Teardown - KillAllIE
10 okt 2014 08:57:10 [main] INFO tasks.Teardown - KillAllFirefox
10 okt 2014 08:57:10 [main] INFO tasks.Teardown - KillAllChrome
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y MoveMouse - /move_mouse - Moves the computers mouse to x and y location. (Default 0,0)
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y RebootNode - /reboot - Restart the host node
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y VideoRecorder - /video - Starts and stops video recording
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y KillAllIE - /kill_ie - Executes os level kill command on all instance of Internet Explorer
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y KillAllFirefox - /kill_firefox - Executes os level kill command on all instance of Firefox
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y KillAllChrome - /kill_chrome - Executes os level kill command on all instance of Google Chrome
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y KillAllSafari - /kill_safari - Executes os level kill command on all instance of Safari
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y GetProcesses - /ps - Gets a list of currently running processes
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y KillPid - /kill_pid - Kills a given process id
10 okt 2014 08:57:10 [main] INFO tasks.ExecuteOSTask - Y Netstat - /netstat - Returns a system call for all ports. Use /port_info to get parsed details
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y Screenshot - /screenshot - Take a full OS screen Screen Shot of the node
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y ExposeDirectory - /dir - Gives accesses to a shared directory, user has access to put files into it and get files from it. Directory deleted on restart.
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y StartGrid - /start_grid - Starts an instance of Selenium Grid Hub or NodeConfig
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y GetInfoForPort - /port_info - Returns parsed information on a PID occupying a given port
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y GridStatus - /grid_status - Returns status of the Selenium Grid hub/node. If currently running and what is the PID
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y KillAllByName - /kill_all_by_name - Executes os level kill command on a given PID name
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y StopGrid - /stop_grid - Stops grid or node process
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y GetConfig - /config - Returns JSON view of the full configuration of the Selenium Grid Extras
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y StopGridExtras - /stop_extras - Shuts down Grid Extras service
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y IEProtectedMode - /ie_protected_mode - Changes protected mode for Internet Explorer on/off. No param for current status
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y SystemInfo - /system - Returns system details about the current node
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y GetNodeConfig - /get_node_config - Provides the grid node config from central location
10 okt 2014 08:57:11 [main] INFO tasks.ExecuteOSTask - Y UpdateNodeConfig - /update_node_config - Send the current config to the central location to be stored
10 okt 2014 08:57:11 [main] INFO webdriverreleasemanager.WebDriverReleaseManager - Checking the latest version of WebDriver, IEDriver, ChromeDriver from http://selenium-release.storage.googleapis.com/ and http://chromedriver.storage.googleapis.com/LATEST_RELEASE
10 okt 2014 08:57:12 [main] INFO tasks.AutoUpgradeDrivers - Chrome Driver needs to be updated to latest version of 2.11
10 okt 2014 08:57:12 [main] INFO tasks.ExecuteOSTask - Update was detected for one or more versions of the drivers. You may need to restart Grid Extras for new versions to work
10 okt 2014 08:57:12 [main] INFO tasks.AutoUpgradeDrivers - {theConfigMap={auto_start_node=1, hub_config={}, reboot_after_sessions=0, auto_start_hub=0, webdriver={version=2.43.1}, iedriver={version=2.43.0}, default_role=node, chromedriver={version=2.11}, auto_update_drivers=1, video_recording_options={videos_to_keep=5000, video_output_dir=\someserver\UI-logs\webdriver-videos}, tear_down=[com.groupon.seleniumgridextras.tasks.SessionCounterStopSession, com.groupon.seleniumgridextras.tasks.KillAllIE, com.groupon.seleniumgridextras.tasks.KillAllFirefox, com.groupon.seleniumgridextras.tasks.KillAllChrome], setup=[com.groupon.seleniumgridextras.tasks.SessionCounterStartSession], node_config_files=[node_5555.json]}}
10 okt 2014 08:57:12 [main] INFO tasks.AutoUpgradeDrivers - {theConfigMap={auto_start_node=1, hub_config={}, reboot_after_sessions=0, auto_start_hub=0, webdriver={version=2.43.1}, iedriver={version=2.43.0}, default_role=node, chromedriver={version=2.11}, auto_update_drivers=1, video_recording_options={videos_to_keep=5000, video_output_dir=\someserver\UI-logs\webdriver-videos}, tear_down=[com.groupon.seleniumgridextras.tasks.SessionCounterStopSession, com.groupon.seleniumgridextras.tasks.KillAllIE, com.groupon.seleniumgridextras.tasks.KillAllFirefox, com.groupon.seleniumgridextras.tasks.KillAllChrome], setup=[com.groupon.seleniumgridextras.tasks.SessionCounterStartSession], node_config_files=[node_5555.json]}}
10 okt 2014 08:57:12 [main] INFO tasks.ExecuteOSTask - Y AutoUpgradeDrivers - /auto_upgrade_webdriver - Automatically checks the latest versions of all drivers and upgrades the current config to use them
10 okt 2014 08:57:12 [main] INFO tasks.ExecuteOSTask - Y DownloadWebdriver - /download_webdriver - Downloads a version of WebDriver jar to local machine
10 okt 2014 08:57:12 [main] INFO tasks.ExecuteOSTask - Y DownloadIEDriver - /download_iedriver - Downloads a version of IEDriver.exe to local machine
10 okt 2014 08:57:12 [main] INFO tasks.ExecuteOSTask - Y DownloadChromeDriver - /download_chromedriver - Downloads a version of ChromeDriver to local machine
10 okt 2014 08:57:12 [main] INFO seleniumgridextras.SeleniumGridExtras - API documentation
10 okt 2014 08:57:12 [main] INFO seleniumgridextras.SeleniumGridExtras - /api - Located here
10 okt 2014 08:57:12 [main] INFO seleniumgridextras.SeleniumGridExtras - Grid NodeConfig was set to Autostart
10 okt 2014 08:57:12 [main] INFO config.Config - {}
10 okt 2014 08:57:12 [main] INFO grid.GridStarter - Node Start Command:

[start node_5555.bat]
10 okt 2014 08:57:12 [main] INFO grid.GridStarter - start node_5555.bat
10 okt 2014 08:57:12 [main] INFO grid.GridStarter - {"exit_code":0,"out":["Background process started"],"error":[]}
10 okt 2014 08:57:12 [main] INFO seleniumgridextras.SeleniumGridExtras - Server has been started
10 okt 2014 08:57:12 [main] INFO videorecording.VideoShutdownHook - Creating instance of the video shutdown hook
10 okt 2014 08:57:12 [main] INFO videorecording.VideoShutdownHook - Shut Down Hook Attached.
10 okt 2014 08:57:13 [main] INFO server.SeleniumServer - Writing debug logs to log\node_5555.log
10 okt 2014 08:57:13 [main] INFO server.SeleniumServer - Java: Oracle Corporation 25.20-b23
10 okt 2014 08:57:13 [main] INFO server.SeleniumServer - OS: Windows 7 6.1 x86
10 okt 2014 08:57:13 [main] INFO server.SeleniumServer - v2.43.1, with Core v2.43.1. Built from revision 5163bce
10 okt 2014 08:57:14 [main] INFO server.SeleniumServer - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
10 okt 2014 08:57:14 [main] INFO http.HttpServer - Version Jetty/5.1.x
10 okt 2014 08:57:14 [main] INFO util.Container - Started HttpContext[/selenium-server,/selenium-server]
10 okt 2014 08:57:14 [main] INFO util.Container - Started org.openqa.jetty.jetty.servlet.ServletHandler@1021e6c
10 okt 2014 08:57:14 [main] INFO util.Container - Started HttpContext[/wd,/wd]
10 okt 2014 08:57:14 [main] INFO util.Container - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
10 okt 2014 08:57:14 [main] INFO util.Container - Started HttpContext[/,/]
10 okt 2014 08:57:14 [main] INFO http.SocketListener - Started SocketListener on 0.0.0.0:5555
10 okt 2014 08:57:14 [main] INFO util.Container - Started org.openqa.jetty.jetty.Server@1805618
10 okt 2014 09:05:39 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 1 sessions
10 okt 2014 09:05:46 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Initializing a new thread pool
10 okt 2014 09:05:52 [pool-1-thread-1] INFO videorecording.VideoRecorderCallable - Starting video recording for session bf8e9cf1-91c0-4b27-b8e9-031060987301 to \someserver\UI-logs\webdriver-videos
10 okt 2014 09:06:16 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Tried to stop video for session bf8e9cf1-91c0-4b27-b8e9-031060987301 but recording was already stopped
10 okt 2014 09:06:16 [Thread-5] INFO tasks.SessionCounterStopSession - This node has ended 1 sessions
10 okt 2014 09:06:17 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 2 sessions
10 okt 2014 09:06:20 [pool-1-thread-1] INFO videorecording.VideoRecorderCallable - Starting video recording for session d17248a0-d37d-4098-8a81-cf1a263ca0de to \someserver\UI-logs\webdriver-videos
10 okt 2014 09:06:44 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Tried to stop video for session d17248a0-d37d-4098-8a81-cf1a263ca0de but recording was already stopped
10 okt 2014 09:06:44 [Thread-5] INFO tasks.SessionCounterStopSession - This node has ended 2 sessions
10 okt 2014 09:06:48 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 3 sessions
10 okt 2014 09:06:51 [pool-1-thread-1] INFO videorecording.VideoRecorderCallable - Starting video recording for session c8896227-5ae6-440d-8f96-9351f80c6b1f to \someserver\UI-logs\webdriver-videos
10 okt 2014 09:07:10 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Tried to stop video for session c8896227-5ae6-440d-8f96-9351f80c6b1f but recording was already stopped
10 okt 2014 09:07:10 [Thread-5] INFO tasks.SessionCounterStopSession - This node has ended 3 sessions
10 okt 2014 09:07:13 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 4 sessions
10 okt 2014 09:07:16 [pool-1-thread-1] INFO videorecording.VideoRecorderCallable - Starting video recording for session dd0e61c3-bc6a-4369-8bf9-e120edc51141 to \someserver\UI-logs\webdriver-videos
10 okt 2014 09:07:33 [Thread-5] INFO tasks.SessionCounterStopSession - This node has ended 4 sessions
10 okt 2014 09:07:34 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Tried to stop video for session dd0e61c3-bc6a-4369-8bf9-e120edc51141 but recording was already stopped
10 okt 2014 09:07:34 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 5 sessions
10 okt 2014 09:07:36 [pool-1-thread-1] INFO videorecording.VideoRecorderCallable - Starting video recording for session 085f14a9-3ecf-41df-a60a-52ed8c609257 to \someserver\UI-logs\webdriver-videos
10 okt 2014 09:07:52 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Tried to stop video for session 085f14a9-3ecf-41df-a60a-52ed8c609257 but recording was already stopped
10 okt 2014 09:07:52 [Thread-5] INFO tasks.SessionCounterStopSession - This node has ended 5 sessions
10 okt 2014 09:07:56 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 6 sessions
10 okt 2014 09:07:58 [pool-1-thread-1] INFO videorecording.VideoRecorderCallable - Starting video recording for session 80c26b62-2b64-4d2f-b793-381a337fe277 to \someserver\UI-logs\webdriver-videos
10 okt 2014 09:08:16 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Tried to stop video for session 80c26b62-2b64-4d2f-b793-381a337fe277 but recording was already stopped
10 okt 2014 09:08:16 [Thread-5] INFO tasks.SessionCounterStopSession - This node has ended 6 sessions
10 okt 2014 09:08:19 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 7 sessions
10 okt 2014 09:08:22 [pool-1-thread-1] INFO videorecording.VideoRecorderCallable - Starting video recording for session b9621d2f-53c9-40e1-9d3b-7c2d063d272e to \someserver\UI-logs\webdriver-videos
10 okt 2014 09:08:36 [Thread-5] INFO tasks.SessionCounterStopSession - This node has ended 7 sessions
10 okt 2014 09:08:36 [Thread-5] INFO videorecording.VideoRecordingThreadPool - Tried to stop video for session b9621d2f-53c9-40e1-9d3b-7c2d063d272e but recording was already stopped
10 okt 2014 09:08:36 [Thread-5] INFO tasks.SessionCounterStartSession - This node has started 8 sessions

Aftyerwards the node is hungup and is remains blocked for the grid...

Video recording : nodes execute only 1 session, then are locked

Experienced a strange problem :

Video recording is activated.
Each node exactly executes 1 test session.
After this , the node does not becomes available for next sessions.

The grid console shows the nodes as executing a session, but inspecting the desktop of the nodes shows the session has ended and browsers are closed.

As a result, the entire test campaign fails

The video files are recorded on a UNC windows network share.

When turning off video rec ("record_test_videos": "false") on the nodes,
the problem disappeared.

It seems that the video recording has problems to finish or does not allow the grid session to be ended normally..

grid extras : 1.5.1
Webdriver : 2.43.1
Nodes : win7 x64
Hub: Linux
JRE 1.8

Node config :
{
"theConfigMap": {
"auto_start_node": "1",
"hub_config": {},
"reboot_after_sessions": "0",
"auto_start_hub": "0",
"webdriver": {
"version": "2.43.1"
},
"iedriver": {
"version": "2.43.0"
},
"default_role": "node",
"chromedriver": {
"version": "2.11"
},
"auto_update_drivers": "0",
"video_recording_options": {
"videos_to_keep": "5000",
"width": "1680",
"record_test_videos": "false",
"height": "1050",
"video_output_dir": "\somewindowshost\UI-logs\webdriver-videos"
},
"tear_down": [
],
"setup": [
],
"node_config_files": [
"node_5555.json",
"node_5556.json",
"node_5557.json"
]
}
}

5555 json config :
{
"capabilities": [
{
"seleniumProtocol": "WebDriver",
"browserName": "internet explorer",
"maxInstances": 1,
"platform": "WINDOWS"
}
],
"configuration": {
"proxy": "com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy",
"maxSession": 1,
"port": 5555,
"register": true,
"unregisterIfStillDownAfter": 30000,
"hubPort": 4444,
"hubHost": "somehost",
"nodeStatusCheckTimeout": 30000,
"downPollingLimit": 0
}
}

Let me know if you need more data, but FTTB I had to turn the videorecording off ..
Thanks.

Jurgen.

Attempting to start a grid hub & node issue. Not able to start the hub & node

I am not able to start the hub & node using the jar.

Chrome,IE drivers successfully downloaded, But hub is not started. A second command prompt opens and Command stuck.

PFA the screen shot .

capture1
capture2
capture3

Here is the log.out .

04 Sep 2014 11:23:34 [main] INFO seleniumgridextras.SeleniumGridExtras - Loaded Grid Logger from log4j.properties
04 Sep 2014 11:23:34 [main] INFO remote.ConfigPuller - Config file storing central repository URL is D:\Grid\configs\central_config_repo_config.txt
04 Sep 2014 11:23:34 [main] INFO remote.ConfigPuller - Config file for central repo does not exist D:\Grid\configs\central_config_repo_config.txt
04 Sep 2014 11:23:34 [main] INFO remote.ConfigPuller - Central config URL for current node is set to ''
04 Sep 2014 11:23:34 [main] INFO remote.ConfigPuller - The central config URL is empty, will not download the latest configs.
04 Sep 2014 11:23:34 [main] INFO config.ConfigFileReader - File selenium_grid_extras_config.json does not exist, going to use default configs
04 Sep 2014 11:23:34 [main] INFO config.RuntimeConfig - Previous config was not found, will ask input from user
04 Sep 2014 11:23:34 [main] INFO config.FirstTimeRunConfig - We noticed this is a first time running, we will ask some configuration settings
04 Sep 2014 11:23:42 [main] INFO config.FirstTimeRunConfig - '3' was set as your value
04 Sep 2014 11:23:48 [main] INFO config.FirstTimeRunConfig - '127.0.0.1' was set as your value
04 Sep 2014 11:23:55 [main] INFO config.FirstTimeRunConfig - '4444' was set as your value
04 Sep 2014 11:23:58 [main] INFO config.FirstTimeRunConfig - 'WINDOWS' was set as your value
04 Sep 2014 11:24:01 [main] INFO config.FirstTimeRunConfig - '1' was set as your value
04 Sep 2014 11:24:04 [main] INFO config.FirstTimeRunConfig - '1' was set as your value
04 Sep 2014 11:24:06 [main] INFO config.FirstTimeRunConfig - '0' was set as your value
04 Sep 2014 11:24:35 [main] INFO config.FirstTimeRunConfig - '1' was set as your value
04 Sep 2014 11:24:41 [main] INFO config.FirstTimeRunConfig - '1' was set as your value
04 Sep 2014 11:24:41 [main] INFO webdriverreleasemanager.WebDriverReleaseManager - Checking the latest version of WebDriver, IEDriver, ChromeDriver from http://selenium-release.storage.googleapis.com/ and http://chromedriver.storage.googleapis.com/LATEST_RELEASE
04 Sep 2014 11:24:44 [main] INFO config.FirstTimeRunConfig - Thank you, your answers were recorded to 'selenium_grid_extras_config.json'

You can modify this file directly to tweak more options
04 Sep 2014 11:24:44 [main] INFO grid.SelfHealingGrid - GridExtras is not running will boot normally
04 Sep 2014 11:24:44 [main] INFO seleniumgridextras.SeleniumGridExtras - Initializing Task Modules
04 Sep 2014 11:24:44 [main] INFO tasks.Setup - Setup Tasks
04 Sep 2014 11:24:44 [main] INFO tasks.Setup - MoveMouse
04 Sep 2014 11:24:44 [main] INFO tasks.Setup - SessionCounterStartSession
04 Sep 2014 11:24:44 [main] INFO tasks.Teardown - Tear-Down Tasks
04 Sep 2014 11:24:44 [main] INFO tasks.Teardown - MoveMouse
04 Sep 2014 11:24:44 [main] INFO tasks.Teardown - SessionCounterStopSession
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y MoveMouse - /move_mouse - Moves the computers mouse to x and y location. (Default 0,0)
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y RebootNode - /reboot - Restart the host node
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y KillAllIE - /kill_ie - Executes os level kill command on all instance of Internet Explorer
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y KillAllFirefox - /kill_firefox - Executes os level kill command on all instance of Firefox
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y KillAllChrome - /kill_chrome - Executes os level kill command on all instance of Google Chrome
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y GetProcesses - /ps - Gets a list of currently running processes
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y KillPid - /kill_pid - Kills a given process id
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y Netstat - /netstat - Returns a system call for all ports. Use /port_info to get parsed details
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Screenshot is enabled
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y Screenshot - /screenshot - Take a full OS screen Screen Shot of the node
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y ExposeDirectory - /dir - Gives accesses to a shared directory, user has access to put files into it and get files from it. Directory deleted on restart.
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y StartGrid - /start_grid - Starts an instance of Selenium Grid Hub or NodeConfig
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y GetInfoForPort - /port_info - Returns parsed information on a PID occupying a given port
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y GridStatus - /grid_status - Returns status of the Selenium Grid hub/node. If currently running and what is the PID
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y KillAllByName - /kill_all_by_name - Executes os level kill command on a given PID name
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y StopGrid - /stop_grid - Stops grid or node process
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y GetConfig - /config - Returns JSON view of the full configuration of the Selenium Grid Extras
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y StopGridExtras - /stop_extras - Shuts down Grid Extras service
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y IEProtectedMode - /ie_protected_mode - Changes protected mode for Internet Explorer on/off. No param for current status
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y SystemInfo - /system - Returns system details about the current node
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y GetNodeConfig - /get_node_config - Provides the grid node config from central location
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y UpdateNodeConfig - /update_node_config - Send the current config to the central location to be stored
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y AutoUpgradeDrivers - /auto_upgrade_webdriver - Automatically checks the latest versions of all drivers and upgrades the current config to use them
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Y DownloadWebdriver - /download_webdriver - Downloads a version of WebDriver jar to local machine
04 Sep 2014 11:24:44 [main] INFO tasks.ExecuteOSTask - Download IE Driver Executable 2.42.0
04 Sep 2014 11:24:44 [main] INFO downloader.Downloader - Starting to download from https://selenium-release.storage.googleapis.com/2.42/IEDriverServer_Win32_2.42.0.zip
04 Sep 2014 11:24:45 [main] ERROR downloader.Downloader - javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
04 Sep 2014 11:24:45 [main] ERROR downloader.Downloader - Download failed
04 Sep 2014 11:24:45 [main] INFO tasks.DownloadIEDriver - {"exit_code":1,"out":[],"error":["javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target"],"root_dir":["\tmp\webdriver\iedriver"],"file":["2.42.0Win32.zip"],"file_full_path":["D:\tmp\webdriver\iedriver\2.42.0Win32.zip"],"source_url":["https://selenium-release.storage.googleapis.com/2.42/IEDriverServer_Win32_2.42.0.zip"]}
04 Sep 2014 11:24:45 [main] INFO tasks.ExecuteOSTask - Y DownloadIEDriver - /download_iedriver - Downloads a version of IEDriver.exe to local machine
04 Sep 2014 11:24:45 [main] INFO tasks.ExecuteOSTask - Y DownloadChromeDriver - /download_chromedriver - Downloads a version of ChromeDriver to local machine
04 Sep 2014 11:24:45 [main] INFO seleniumgridextras.SeleniumGridExtras - API documentation
04 Sep 2014 11:24:45 [main] INFO seleniumgridextras.SeleniumGridExtras - /api - Located here
04 Sep 2014 11:24:45 [main] INFO seleniumgridextras.SeleniumGridExtras - Grid Hub was set to Autostart
04 Sep 2014 11:24:45 [main] INFO config.Config - {}
04 Sep 2014 11:24:45 [main] INFO grid.GridStarter - Hub Start Command:

java -cp "D:\Grid\SeleniumGridExtras-1.4.0-SNAPSHOT-jar-with-dependencies.jar;\tmp\webdriver\2.42.2.jar" org.openqa.grid.selenium.GridLauncher -role hub -port 4444 -servlets com.groupon.seleniumgridextras.grid.servlets.SeleniumGridExtrasServlet,com.groupon.seleniumgridextras.grid.servlets.ProxyStatusJsonServlet -log log\grid_hub.log -newSessionWaitTimeout 120000 -browserTimeout 120 -timeout 120
04 Sep 2014 11:24:45 [main] INFO tasks.StartGrid - {"exit_code":0,"out":["Background process started"],"error":[]}
04 Sep 2014 11:24:45 [main] INFO seleniumgridextras.SeleniumGridExtras - Grid NodeConfig was set to Autostart
04 Sep 2014 11:24:45 [main] INFO config.Config - {}
04 Sep 2014 11:24:45 [main] INFO grid.GridStarter - Node Start Command:

[start node_5555.bat]
04 Sep 2014 11:24:45 [main] INFO grid.GridStarter - start node_5555.bat
04 Sep 2014 11:24:45 [main] INFO grid.GridStarter - {"exit_code":0,"out":["Background process started"],"error":[]}
04 Sep 2014 11:24:45 [main] INFO seleniumgridextras.SeleniumGridExtras - Server has been started
04 Sep 2014 11:24:47 [main] INFO server.SeleniumServer - Writing debug logs to log\node_5555.log
04 Sep 2014 11:24:47 [main] INFO server.SeleniumServer - Java: Oracle Corporation 21.0-b17
04 Sep 2014 11:24:47 [main] INFO server.SeleniumServer - OS: Windows 7 6.1 amd64
04 Sep 2014 11:24:47 [main] INFO server.SeleniumServer - v2.42.2, with Core v2.42.2. Built from revision 6a6995d
04 Sep 2014 11:24:47 [main] INFO server.SeleniumServer - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
04 Sep 2014 11:24:47 [main] INFO http.HttpServer - Version Jetty/5.1.x
04 Sep 2014 11:24:47 [main] INFO util.Container - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
04 Sep 2014 11:24:47 [main] INFO util.Container - Started HttpContext[/selenium-server,/selenium-server]
04 Sep 2014 11:24:47 [main] INFO util.Container - Started HttpContext[/,/]
04 Sep 2014 11:24:47 [main] INFO util.Container - Started org.openqa.jetty.jetty.servlet.ServletHandler@2ca10882
04 Sep 2014 11:24:47 [main] INFO util.Container - Started HttpContext[/wd,/wd]
04 Sep 2014 11:24:47 [main] INFO http.SocketListener - Started SocketListener on 0.0.0.0:5555
04 Sep 2014 11:24:47 [main] INFO util.Container - Started org.openqa.jetty.jetty.Server@5ecb8fc2
04 Sep 2014 11:24:47 [qtp875939774-13] INFO proxies.SetupTeardownProxy - Attaching a node: 10.102.37.165
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO server.SeleniumServer - Shutting down...
04 Sep 2014 11:27:05 [Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=5555]] INFO util.ThreadedServer - Stopping Acceptor ServerSocket[addr=0.0.0.0/0.0.0.0,port=0,localport=5555]
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO http.SocketListener - Stopped SocketListener on 0.0.0.0:5555
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO util.Container - Stopped HttpContext[/selenium-server/driver,/selenium-server/driver]
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO util.Container - Stopped HttpContext[/selenium-server,/selenium-server]
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO util.Container - Stopped HttpContext[/,/]
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO util.Container - Stopped org.openqa.jetty.jetty.servlet.ServletHandler@2ca10882
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO util.Container - Stopped HttpContext[/wd,/wd]
04 Sep 2014 11:27:05 [SeleniumServerShutDownHook] INFO util.Container - Stopped org.openqa.jetty.jetty.Server@5ecb8fc2
04 Sep 2014 11:27:14 [main] INFO server.SeleniumServer - Writing debug logs to log\node_5555.log
04 Sep 2014 11:27:14 [main] INFO server.SeleniumServer - Java: Oracle Corporation 21.0-b17
04 Sep 2014 11:27:14 [main] INFO server.SeleniumServer - OS: Windows 7 6.1 amd64
04 Sep 2014 11:27:14 [main] INFO server.SeleniumServer - v2.42.2, with Core v2.42.2. Built from revision 6a6995d
04 Sep 2014 11:27:14 [main] INFO server.SeleniumServer - RemoteWebDriver instances should connect to: http://127.0.0.1:5555/wd/hub
04 Sep 2014 11:27:14 [main] INFO http.HttpServer - Version Jetty/5.1.x
04 Sep 2014 11:27:14 [main] INFO util.Container - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
04 Sep 2014 11:27:14 [main] INFO util.Container - Started HttpContext[/selenium-server,/selenium-server]
04 Sep 2014 11:27:14 [main] INFO util.Container - Started HttpContext[/,/]
04 Sep 2014 11:27:14 [main] INFO util.Container - Started org.openqa.jetty.jetty.servlet.ServletHandler@2ca10882
04 Sep 2014 11:27:14 [main] INFO util.Container - Started HttpContext[/wd,/wd]
04 Sep 2014 11:27:14 [main] INFO http.SocketListener - Started SocketListener on 0.0.0.0:5555
04 Sep 2014 11:27:14 [main] INFO util.Container - Started org.openqa.jetty.jetty.Server@5ecb8fc2
04 Sep 2014 11:27:14 [qtp875939774-18] INFO proxies.SetupTeardownProxy - Attaching a node: 10.102.37.165

Video Session seems to have timed out

I'm trying to capture videos on the vm running the selenium test, but it seems that video is not created.
I can see the file but it is 0 bytes.

The log i'm getting is:

20 Nov 2014 18:42:45 [Thread-5] INFO tasks.VideoRecorder - Starting video recording for session: 9a797c2d-ff01-4953-b7ef-690d23eae5a3, on host: 10.149.18.66, done: false, cancelled: false
20 Nov 2014 18:42:45 [pool-2-thread-1] INFO video.VideoRecorderCallable - Starting video recording for session 9a797c2d-ff01-4953-b7ef-690d23eae5a3 to C:\RemoteWebDriver\video_output
20 Nov 2014 18:42:48 [Thread-5] INFO video.VideoRecordingThreadPool - Video Session 9a797c2d-ff01-4953-b7ef-690d23eae5a3 seems to have timed out, removing it from memory
20 Nov 2014 18:43:34 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - Setting video source directory to C:\RemoteWebDriver\video_output
20 Nov 2014 18:43:34 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - New video download request for C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4
20 Nov 2014 18:43:34 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - Requested video C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4 does exist, responding with 404
20 Nov 2014 18:43:35 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - New video download request for C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4
20 Nov 2014 18:43:35 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - Requested video C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4 does exist, responding with 404
20 Nov 2014 18:43:36 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - New video download request for C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4
20 Nov 2014 18:43:36 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - Requested video C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4 does exist, responding with 404
20 Nov 2014 18:43:38 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - New video download request for C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4
20 Nov 2014 18:43:38 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - Requested video C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4 does exist, responding with 404
20 Nov 2014 18:43:40 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - New video download request for C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4
20 Nov 2014 18:43:40 [Thread-5] INFO seleniumgridextras.VideoHttpExecutor - Requested video C:\RemoteWebDriver\video_output\9a797c2d-ff01-4953-b7ef-690d23eae5a3.mp4 does exist, responding with 404

thanks!

Document all of the configs

These are the configs listed in selenium_grid_extras_config.json.example, all of them need pretty documentation

Auto fix browser versions

Currently if version of the browser is set as int in the json file, it will make the capability matcher fail. Fix it so that this is corrected on it's own.

Error running /ps with a Windows node.

I get the following message while using /ps.

hostname:3000/ps { "exit_code": 1, "out": [ "" ], "error": [ "The name of the file, the name of the folder or the syntax label are not correct." ] }

I'm asking /ps against a Windows 7 node.

Multiple node connectivity issue

I update the node_5555.json file with adding the browser version for each browser as i need to test in different browser-version. it connects to my hub successfully. But it cant redirect my request to that particular node. And the browser console got hanged when i try to refresh it. But the test cases are running properly on my local machine hub and node. Although i restart the hub and node a multiple times, but the issue persists.

Please find the attached screenshots -
capture

heres the log.out -

19:09:25.708 INFO [1] org.openqa.grid.selenium.GridLauncher - Launching a selenium grid server
19:09:26.418 INFO [1] org.openqa.grid.web.Hub - binding com.groupon.seleniumgridextras.grid.servlets.SeleniumGridExtrasServlet to /grid/admin/SeleniumGridExtrasServlet/*
19:09:26.418 INFO [1] org.openqa.grid.web.Hub - binding com.groupon.seleniumgridextras.grid.servlets.ProxyStatusJsonServlet to /grid/admin/ProxyStatusJsonServlet/*
19:09:32.948 WARN [24] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
19:09:32.948 WARN [24] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Marking the node as down. Cannot reach the node for 1 tries.
19:09:38.948 WARN [24] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
19:09:44.948 WARN [24] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
19:09:44.948 WARN [24] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Unregistering the node. It's been down for 12000 milliseconds.
19:09:44.948 WARN [24] org.openqa.grid.internal.Registry - Proxy 'host :http://10.102.37.165:5555' was previously registered. Cleaning up any stale test sessions.
19:12:00.833 INFO [17] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{platform=WINDOWS, browserName=firefox, version=27}]
19:12:00.834 INFO [10] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://10.102.37.165:5555]
19:12:00.919 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://10.102.37.165:5555
19:12:00.919 INFO [10] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {seleniumProtocol=WebDriver, platform=WINDOWS, browserName=firefox, maxInstances=3, version=27}
19:14:53.393 INFO [17] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{platform=WINDOWS, browserName=chrome, version=36}]
19:14:53.393 INFO [10] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://10.102.37.165:5555]
19:14:53.492 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://10.102.37.165:5555
19:14:53.493 INFO [10] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {seleniumProtocol=WebDriver, platform=WINDOWS, browserName=chrome, maxInstances=3, version=36}
19:14:53.543 INFO [14] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{platform=WINDOWS, ensureCleanSession=true, ignoreProtectedModeSettings=true, elementScrollBehavior=true, requireWindowFocus=true, browserName=internet explorer, enableElementCacheCleanup=true, ie.browserCommandLineSwitches=true, version=10}]
19:14:53.544 INFO [10] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://10.102.37.165:5555]
19:14:53.685 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://10.102.37.165:5555
19:14:53.685 INFO [10] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {seleniumProtocol=WebDriver, platform=WINDOWS, browserName=internet explorer, maxInstances=1, version=10}
19:14:53.719 INFO [16] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{platform=WINDOWS, browserName=firefox, version=27}]
19:14:53.719 INFO [10] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://10.102.37.165:5555]
19:14:54.795 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://10.102.37.165:5555
19:14:54.796 INFO [10] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {seleniumProtocol=WebDriver, platform=WINDOWS, browserName=firefox, maxInstances=3, version=27}
20:16:51.757 WARN [27] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
20:16:51.757 WARN [27] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Marking the node as down. Cannot reach the node for 1 tries.
20:16:57.810 WARN [27] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
20:17:03.847 WARN [27] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
20:17:03.847 WARN [27] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Unregistering the node. It's been down for 12090 milliseconds.
20:17:03.847 WARN [27] org.openqa.grid.internal.Registry - Proxy 'host :http://10.102.37.165:5555' was previously registered. Cleaning up any stale test sessions.
10:52:25.495 INFO [1] org.openqa.grid.selenium.GridLauncher - Launching a selenium grid server
10:52:26.112 INFO [1] org.openqa.grid.web.Hub - binding com.groupon.seleniumgridextras.grid.servlets.SeleniumGridExtrasServlet to /grid/admin/SeleniumGridExtrasServlet/*
10:52:26.113 INFO [1] org.openqa.grid.web.Hub - binding com.groupon.seleniumgridextras.grid.servlets.ProxyStatusJsonServlet to /grid/admin/ProxyStatusJsonServlet/*
10:52:32.855 WARN [23] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
10:52:32.855 WARN [23] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Marking the node as down. Cannot reach the node for 1 tries.
10:52:38.868 WARN [23] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
10:52:44.872 WARN [23] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Failed to check status of node: Connect to 10.102.37.165:5555 [/10.102.37.165] failed: Connection refused: connect
10:52:44.872 WARN [23] org.openqa.grid.selenium.proxy.DefaultRemoteProxy - Unregistering the node. It's been down for 12017 milliseconds.
10:52:44.873 WARN [23] org.openqa.grid.internal.Registry - Proxy 'host :http://10.102.37.165:5555' was previously registered. Cleaning up any stale test sessions.
10:55:40.185 INFO [28] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{platform=WINDOWS, browserName=firefox, version=27}]
10:55:40.186 INFO [10] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://10.102.37.165:5555, host :http://10.102.37.167:5555]
10:55:40.292 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://10.102.37.165:5555
10:55:40.292 INFO [10] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {seleniumProtocol=WebDriver, platform=WINDOWS, browserName=firefox, maxInstances=3, version=27}
10:57:04.138 INFO [28] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{platform=WINDOWS, browserName=firefox, version=26}]
10:57:04.139 INFO [10] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://10.102.37.165:5555, host :http://10.102.37.167:5555]
10:57:04.201 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://10.102.37.165:5555
10:57:04.201 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Node host :http://10.102.37.165:5555 has no matching capability
10:57:05.216 ERROR [10] org.openqa.grid.internal.Registry - Unhandled exception in Matcher thread.
java.lang.NullPointerException
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.timeToReboot(SetupTeardownProxy.java:176)
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.getNewSession(SetupTeardownProxy.java:80)
at org.openqa.grid.internal.ProxySet.getNewSession(ProxySet.java:137)
at org.openqa.grid.internal.Registry.takeRequestHandler(Registry.java:282)
at org.openqa.grid.internal.Registry.access$4(Registry.java:281)
at org.openqa.grid.internal.Registry$2.apply(Registry.java:267)
at org.openqa.grid.internal.Registry$2.apply(Registry.java:1)
at org.openqa.grid.internal.NewSessionRequestQueue.processQueue(NewSessionRequestQueue.java:75)
at org.openqa.grid.internal.Registry.assignRequestToProxy(Registry.java:265)
at org.openqa.grid.internal.Registry.access$1(Registry.java:260)
at org.openqa.grid.internal.Registry$Matcher.run(Registry.java:215)
10:57:10.219 INFO [10] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://10.102.37.165:5555, host :http://10.102.37.167:5555]
10:57:10.319 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://10.102.37.165:5555
10:57:10.319 INFO [10] org.openqa.grid.internal.BaseRemoteProxy - Node host :http://10.102.37.165:5555 has no matching capability

Grid Topology

First off, thanks for the work thats been put into this project. It certainly makes for a much better out of the box experience when setting up a testing grid.

I'm still looking though for some tool that can help managing the topology of the grid, ideally the web page of the hub would be different and provide access to each of the node's individual pages. Perhaps even allow updating or applying configurations from that page. Taken to the next level, this would be a great way to provision a new node... visit the hub page and install the configured node from there. Unless I'm missing something, that doesn't seem to be in this project. Does anyone have suggestions of tooling available to start down this path? Is anything like this on the roadmap for this project? Is anyone else looking for anything like this?

Also, is this the right forum for this type of query? I couldn't seem to find any mailing list or other place to share the question.

Thanks

Hub reporting as node?

We noticed this is a first time running, we will ask some configuration settings

What is the default Role of this computer? (1 - node | 2 - hub | 3 - hub & node)

Default Value: 1
2 <-- I chose HUB
'2' was set as your value

What is the HOST for the Selenium Grid Hub?
Default Value: 127.0.0.1

'127.0.0.1' was set as your value

What is the PORT for the Selenium Grid Hub?
Default Value: 4444

'4444' was set as your value

Would you like WebDriver, IEDriver and ChromeDriver to auto update (1-yes/0-no)
Default Value: 1
1
'1' was set as your value
Current Selenium Driver Version: 2.44.0
Current IE Driver Version: 2.44.0
Current Chrome Driver Version: 2.12

Should this Node record test runs? (1-yes/0-no)
Default Value: 1 <-- Yes it asks this

1.6.1 : Exception when starting hub

changed to the new 1.6.1 version, extras jart does start, hub does not , exception logged :

23 Oct 2014 09:31:47 [main] INFO tasks.ExecuteOSTask - Y SessionHistory - /session_history - Displays the threads of test session on all nodes or per node basis
23 Oct 2014 09:31:47 [main] INFO seleniumgridextras.SeleniumGridExtras - API documentation
23 Oct 2014 09:31:47 [main] INFO seleniumgridextras.SeleniumGridExtras - /api - Located here
23 Oct 2014 09:31:47 [main] INFO seleniumgridextras.SeleniumGridExtras - Grid Hub was set to Autostart
23 Oct 2014 09:31:47 [main] INFO seleniumgridextras.SeleniumGridExtras - {"exit_code":1,"out":[],"error":["java.lang.IndexOutOfBoundsException: Index: 0, Size: 0"]}
23 Oct 2014 09:31:47 [main] INFO seleniumgridextras.SeleniumGridExtras -
Selenium Grid Extras has been started!
Navigate to http://localhost:3000 for more details
23 Oct 2014 09:31:47 [main] INFO videorecording.VideoShutdownHook - Creating instance of the video shutdown hook
23 Oct 2014 09:31:47 [main] INFO videorecording.VideoShutdownHook - Shut Down Hook Attached.

Something in the hub config that is not compatible anymore since the 1.5.x release ?

Seleniumversion : 2.43.1
JRE 1.8.25 / Linux

Mixed content security alert creates issue in IE 8

When a https url is trying to access some content from a http domain, IE gives an security alert "Do you want to view only the webpage content that was delivered securely?"

In IE 9 & IE 10 we can prevent this alert by changing the mixed content security setting. But in IE 8 we cant prevent it from prompting this alert. And as of my understanding about Selenium Grid Extras, it is handling all the browser alert during execution in node. But in IE 8 when this alert is popping up, after some time it will disappear(for the alert handling behavior of Selenium Grid Extras) and all my test cases are failing.

After observing your ( @dimacus ) last few commits in Selenium Grid Extras, I think you are currently working on it. And I always thoroughly follow all your commits and changes.

So, if you have any idea or way to prevent it please share with me. It will be really helpful to me.

And also I like to mention that this project is simply a life savior for me. Great work.

Screenshots and video logs black

Occasionally (I haven't managed to figure out the exact conditions yet), running SGE on a VM node will record a black square. I think it's recording the wrong session (there tends to be a console and sometimes a remote user logged in). Is there a way to have it follow the active session? On the plus side, SGE is awesome.
Cheers

Use of Kill browser tasks in setup causes testcase failure : concurrency issue ?

When we add following config :

"tear_down": [
"com.groupon.seleniumgridextras.tasks.MoveMouse",
"com.groupon.seleniumgridextras.tasks.KillAllIE",
"com.groupon.seleniumgridextras.tasks.KillAllFirefox",
"com.groupon.seleniumgridextras.tasks.KillAllChrome"
],
"setup": [
"com.groupon.seleniumgridextras.tasks.MoveMouse",
"com.groupon.seleniumgridextras.tasks.KillAllIE",
"com.groupon.seleniumgridextras.tasks.KillAllFirefox",
"com.groupon.seleniumgridextras.tasks.KillAllChrome"
],

we do randomly observe testcases failing with following error :

UnknownServerException: unknown error: Chrome failed to start: was killed
(Driver info: chromedriver=2.12.301325 (962dea43ddd90e7e4224a03fa3c36a421281abb7),platform=Windows NT 6.1 SP1 x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 61.37 seconds
Build info: version: '2.44.0', revision: '76d78cf', time: '2014-10-23 20:02:37'
System info: host: 'XXXV40003', ip: 'xxx.xx.xx.xx', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_25'
Driver info: org.openqa.selenium.chrome.ChromeDriver

/data/jenkins_home/jobs/etg-integration-head/workspace/ecgui/vendor/facebook/webdriver/lib/WebDriverExceptions.php:68
/data/jenkins_home/jobs/etg-integration-head/workspace/ecgui/vendor/facebook/webdriver/lib/remote/HttpCommandExecutor.php:264
/data/jenkins_home/jobs/etg-integration-head/workspace/ecgui/vendor/facebook/webdriver/lib/remote/RemoteWebDriver.php:74

Could there be a (concurrency) problem that the webdriver session was already started before the setup KillAllChrome task and so the kill task killed the browser that was starting up ?
Maybe because there are multiple tasks in the setup phase ?

Thanks for your feedback.

Sharing config for many nodes

I'm wondering if there is an easy way to configure a node to use a specified shared config folder from the hub? We're looking into managing and auto scaling a large grid and it would be great to be able to specify that an auto created node would use say "config1" or "config2", rather than relying on the machine name folder exist on the hub.

Thanks...

/ie_protected_mode giving error java.lang.NoClassDefFoundError: com/sun/jna/platform/win32/WinReg

I think this is because the Selenium-Grid-Extras jar has selenium-server has "provided" in the pom.xml , and when we start the Selenium-Grid-Extras with java -jar selenium-grid-extras1.4.0.jar , it doesn't know where to find the WinReg class.

If you start Selenium-Grid-Extras with :
java -cp "C:\selenium-grid-extras\SeleniumGridExtras-1.4.0-SNAPSHOT-jar-with-dependencies.jar;\tmp\webdriver\2.43.1.jar" com.groupon.seleniumgridextras.SeleniumGridExtras

It appears to work. But also, we might not have the webdriver jar at this point.

Enhancement : node restart control options

Hi Dima,

the node restart feature is great, but what we see frequently is that during a test campaign, all the grid nodes reach the save restart threshold almost at the same and all start rebooting almost at the same time (in the middle of the test campaign execution) , which is not optimal.
It causes requests queued up at the hub, leads to timeouts and longer feedback cycles.

It could be improved by allowing a configurable node restart timeout value :

it defines the number of seconds (or minutes) the node waits (when idle) with rebooting after it has reached it's restart threshold.
If the node is requested to execute a new test, then the timeout counter is reset again ..

By this you can make sure the node only reboots when the test campaign is over, which has less impact. It still does not prevent that the nodes are rebooted all together at nearly the same time.

Thanks for your feedback !

Node defaults to port 5555, we should be able to customize this on config no?

When I try to setup a node, it launches the 5555 bat file on Windows. I don't see where we would customize the node port.

I'm getting:

C:\ROOT\Startup_Scripts>java -Dwebdriver.ie.driver=\tmp\webdriver\iedriver\iedr
iver_2.43.0_Win32bit.exe -Dwebdriver.chrome.driver=\tmp\webdriver\chromedriver\c
hromedriver_2.10_32bit.exe -cp "C:\ROOT\Selenium_Jars\Selenium-Grid-Extras-Jar.j
ar;\tmp\webdriver\2.43.0.jar" org.openqa.grid.selenium.GridLauncher -role wd -f
riendlyHostName Sel-W7node-1 -nodeConfig node_5555.json -log log\node_5555.log
Exception in thread "main" java.net.BindException: Selenium is already running o
n port 5555. Or some other service is.
at org.openqa.selenium.server.SeleniumServer.start(SeleniumServer.java:4
91)
at org.openqa.selenium.server.SeleniumServer.boot(SeleniumServer.java:30
0)
at org.openqa.grid.internal.utils.SelfRegisteringRemote.startRemoteServe
r(SelfRegisteringRemote.java:135)
at org.openqa.grid.selenium.GridLauncher.main(GridLauncher.java:115)

C:\ROOT\Startup_Scripts>

LOG level

I just noticed that my log files are too big (over 8GB per day). Would be nice if I could set log level to ERROR for example.

SeleniumGridExtrasServlet : Is it supported anymore?

Hi,

We use the SeleniumGridExtrasServlet quite a lot to restart nodes and view live bitmaps of the nodes (currently we are using version 1.1.8) - http://:4444/grid/admin/SeleniumGridExtrasServlet

I want to migrate to the latest SeleniumGridExtras (1.5.2) but when I try hit the Servlet I get this error
17 Oct 2014 15:42:53 [qtp2041416495-19] ERROR servlets.SeleniumGridExtrasServlet - Problem reading: www/body_partial.html
17 Oct 2014 15:42:53 [qtp2041416495-19] ERROR servlets.SeleniumGridExtrasServlet - java.lang.NullPointerException

Just wondering if this is supported anymore?
Love all the new features added btw, thank you!

Using local IP and hostname (i.e. getHostIp and getHostName) when a node specifies a host

We use docker containers for running our selenium nodes in our selenium grid. In our node config file we specify a "host" value so that it selenium hub knows how to connect to it. However selenium-grid-extras is trying to use the local ip. I think it just needs to pull the value from the "host" config option and if it isn't specified it should then look to local settings. I'll try to put together a pull request this weekend...

Please add support for Appium iOS Safari Nodes

At Present we also use Selenium Grid to run our scripts on appium Node for iPhone and iPad Safari. I would really appreciate if you can please add support for Appium nodes so that we can use grid-extras to manage our Appium nodes as well. We are using Appium's 0.18.x version.

This is the sample command which we use to start appium node:

appium -p 4730 --nodeconfig /Users/admin/Desktop/appiumgrid_iPad-Simulator1.json

And this is the sample json which we use:
{
"capabilities": [
{
"browserName": "iPad-Simulator",
"version": "7.1",
"maxInstances": 1,
"platform": "MAC"
}
],
"configuration": {
"cleanUpCycle": 2000,
"timeout": 300000,
"browserTimeout": 60000,
"hub": "http://XXX.20.10.XX:4444/grid/register",
"host": "172.20.10.29",
"maxSession": 1,
"port": 4730,
"hubPort": 4444,
"hubHost": "XXX.20.10.XX",
"url": "http://XXX.20.10.XX:4730/wd/hub",
"register": true,
"registerCycle": 5000,
"role": "node"
}
}

1.6.1 exception when navigating hub status webpage

When navigating to the new status page on port 3000 on the hub machine, there is an exception logged in the grid log if the hub machine is a headless linux :

Navigate to http://localhost:3000 for more details
java.awt.AWTException: headless environment
at java.awt.Robot.(Robot.java:91)
at com.groupon.seleniumgridextras.utilities.ScreenshotUtility.getFullScreenshot(ScreenshotUtility.java:22)
at com.groupon.seleniumgridextras.utilities.ScreenshotUtility.getResizedScreenshot(ScreenshotUtility.java:29)
at com.groupon.seleniumgridextras.utilities.ScreenshotUtility.getResizedScreenshotAsBase64String(ScreenshotUtility.java:51)
at com.groupon.seleniumgridextras.homepage.HtmlNodeRenderer.getScreenshot(HtmlNodeRenderer.java:233)
at com.groupon.seleniumgridextras.homepage.HtmlNodeRenderer.buildScreenshotBillboard(HtmlNodeRenderer.java:261)
at com.groupon.seleniumgridextras.homepage.HtmlNodeRenderer.getFullHtml(HtmlNodeRenderer.java:43)
at com.groupon.seleniumgridextras.homepage.HtmlRenderer.toString(HtmlRenderer.java:71)
at com.groupon.seleniumgridextras.SeleniumGridExtras$3.execute(SeleniumGridExtras.java:121)
at com.groupon.seleniumgridextras.HtmlHttpExecutor.handle(HtmlHttpExecutor.java:56)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:83)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:675)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:79)
at com.groupon.seleniumgridextras.ParameterFilter.doFilter(ParameterFilter.java:69)
at com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:82)
at sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:647)
at sun.net.httpserver.ServerImpl$DefaultExecutor.execute(ServerImpl.java:158)
at sun.net.httpserver.ServerImpl$Dispatcher.handle(ServerImpl.java:431)
at sun.net.httpserver.ServerImpl$Dispatcher.run(ServerImpl.java:396)
at java.lang.Thread.run(Thread.java:745)

image

Cannot start multiple HUBs on the same machine

Hi,

I have problem to start few hubs on the same machine. Here is my shell script:
screen shot 2014-09-17 at 10 34 40 am

When I try manually to start two HUBs on the same machine (on different ports) I got this error (log.out):
screen shot 2014-09-17 at 10 47 48 am

node_5555.log:
screen shot 2014-09-17 at 10 52 19 am

I was able to do this with selenium-server-standalone.jar. So, is there some other way to start two HUBs on the same machine?

Thanks in advance.

http://127.0.0.1:3000/kill_firefox not work in Linux

Hello.

I have executed "http://127.0.0.1:3000/kill_firefox" with navigator and the response is:

{
"exit_code": 1,
"out": [
""
],
"error": [
"Uso: killall [OPCIÓN]... [--] NOMBRE...",
" killall -l, --list",
" killall -V, --version",
"",
" -e,--exact requiere coincidencia exacta para nombres muy largos",
" -I,--ignore-case no diferencia mayúsculas/minúsculas en el nombre del proceso",
" -g,--process-group finaliza un grupo de procesos en lugar de un proceso",
" -y,--younger-than finaliza procesos anteriores a TIEMPO",
" -o,--older-than finaliza procesos posteriores a TIEMPO",
" -i,--interactive pide confirmación antes de finalizar",
" -l,--list lista todos los nombres de señales conocidas",
" -q,--quiet no imprimir quejas",
" -r,--regexp interpreta NOMBRE como una expresión regular extendida",
" -s,--signal SEÑAL envía esta señal en lugar de SIGTERM",
" -u,--user USUARIO finaliza sólo proceso(s) ejecutados como USUARIO",
" -v,--verbose informa si la señal fue enviada correctamente",
" -V,--version muestra información de la versión",
" -w,--wait espera a que los procesos finalicen"
],
"command": "killall -v -m [Ff]irefox",
"wait_to_finish": true
}

Firefoxs not die! The command "killall -v -m [Ff]irefox" is incorrect in Linux, because the param -m not exist. This is a bug?

Thank's!

Less Option in Selection of Node Platform (WIN8 & WIN8_1 are not there)

For now the existing options for node platform are : WINDOWS|XP|VISTA|MAC|LINUX|UNIX|ANDROID.

So, to run the test cases in Windows 8 machine, the platform need to be set as default WINDOWS.
But, Selenium has introduced two enum WIN8 and WIN8_1 for WINDOWS 8 and WINDOWS 8.1 respectively for setting up the OS platform.
Source : https://code.google.com/p/selenium/wiki/GridPlatforms

So, if someone, in his code, set platform as WIN8 to run his test on windows 8 machine and configure the node of Windows 8 machine with WINDOWS option, his test must fail as it leads to the failiure of driver creation.
So, these two options are need to be included in case of platform selection.

recording video

What is needed to actually get a video to record?

Does it work across all browsers?

I have the following on my node:

"video_recording_options": {
  "height": "768",
  "frameSeconds": "1",
  "idle_video_timeout": "120",
  "frames": "5",
  "title_frame_font_color": "129,182,64,128",
  "lower_third_background_color": "0,0,0,200",
  "width": "1024",
  "lower_third_font_color": "255,255,255,255",
  "video_output_dir": "video_output",
  "record_test_videos": "true",
  "videos_to_keep": "3"
},

Chrome finished a test, video_output wasn't created, doesn't exist anywhere....

Thoughts?

Thanks!

Chris

Exception - complete fail after some time with 1.3.1 release

Test initially run fine on the grid,
but after some time, they all start to fail I (no sessions anymore allocated to the nodes) :

Following error output :

14:26:56.740 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://172.21.99.19:5556
14:26:56.740 INFO [9] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {seleniumProtocol=WebDriver, platform=WINDOWS, browserName=chrome, maxInstances=1}
14:26:56.742 INFO [9] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://172.21.99.47:5555, host :http://172.21.99.47:5557, host :http://172.21.99.47:5556, host :http://172.21.99.223:5556, host :http://172.21.99.223:5555, host :http://172.21.99.223:5557, host :http://172.21.99.18:5556, host :http://172.21.99.18:5555, host :http://172.21.99.18:5557, host :http://172.21.99.22:5557, host :http://172.21.99.22:5555, host :http://172.21.99.22:5556, host :http://172.21.99.23:5557, host :http://172.21.99.23:5556, host :http://172.21.99.23:5555, host :http://172.21.99.17:5557, host :http://172.21.99.17:5555, host :http://172.21.99.19:5555, host :http://172.21.99.19:5557, host :http://172.21.99.24:5557, host :http://172.21.99.24:5555, host :http://172.21.99.17:5556, host :http://172.21.99.19:5556, host :http://172.21.99.24:5556]
14:26:56.916 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://172.21.99.47:5555
14:26:56.917 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Node host :http://172.21.99.47:5555 has no matching capability
14:26:58.116 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://172.21.99.47:5557
14:26:58.116 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Node host :http://172.21.99.47:5557 has no matching capability
14:26:59.280 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://172.21.99.47:5556
14:26:59.280 INFO [9] org.openqa.grid.internal.TestSlot - Trying to create a new session on test slot {seleniumProtocol=WebDriver, platform=WINDOWS, browserName=chrome, maxInstances=1}
14:26:59.280 INFO [9] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://172.21.99.47:5555, host :http://172.21.99.47:5557, host :http://172.21.99.223:5556, host :http://172.21.99.223:5555, host :http://172.21.99.223:5557, host :http://172.21.99.18:5556, host :http://172.21.99.18:5555, host :http://172.21.99.18:5557, host :http://172.21.99.22:5557, host :http://172.21.99.22:5555, host :http://172.21.99.22:5556, host :http://172.21.99.23:5557, host :http://172.21.99.23:5556, host :http://172.21.99.23:5555, host :http://172.21.99.17:5557, host :http://172.21.99.17:5555, host :http://172.21.99.19:5555, host :http://172.21.99.19:5557, host :http://172.21.99.24:5557, host :http://172.21.99.24:5555, host :http://172.21.99.47:5556, host :http://172.21.99.17:5556, host :http://172.21.99.19:5556, host :http://172.21.99.24:5556]
14:26:59.488 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Trying to create a new session on node host :http://172.21.99.47:5555
14:26:59.488 INFO [9] org.openqa.grid.internal.BaseRemoteProxy - Node host :http://172.21.99.47:5555 has no matching capability
14:27:00.706 INFO [397] org.openqa.grid.web.servlet.handler.RequestHandler - Got a request to create a new session: Capabilities [{javascriptEnabled=true, browserName=chrome, args=[log-path='\anrfs02.anr.amadeus.net\UI-logs\etg-ccortes-head-241-MoveMiscAddOfferTest-webdriver-chrome-2014-07-16-12-27-00.log', verbose=true]}]
14:27:03.029 ERROR [9] org.openqa.grid.internal.Registry - Unhandled exception in Matcher thread.
java.lang.ClassCastException: com.google.gson.JsonNull cannot be cast to com.google.gson.JsonObject
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.callRemoteGridExtras(SetupTeardownProxy.java:141)
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.killBrowserForCurrentSession(SetupTeardownProxy.java:122)
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.getNewSession(SetupTeardownProxy.java:80)
at org.openqa.grid.internal.ProxySet.getNewSession(ProxySet.java:137)
at org.openqa.grid.internal.Registry.takeRequestHandler(Registry.java:282)
at org.openqa.grid.internal.Registry.access$4(Registry.java:281)
at org.openqa.grid.internal.Registry$2.apply(Registry.java:267)
at org.openqa.grid.internal.Registry$2.apply(Registry.java:1)
at org.openqa.grid.internal.NewSessionRequestQueue.processQueue(NewSessionRequestQueue.java:75)
at org.openqa.grid.internal.Registry.assignRequestToProxy(Registry.java:265)
at org.openqa.grid.internal.Registry.access$1(Registry.java:260)
at org.openqa.grid.internal.Registry$Matcher.run(Registry.java:215)
14:27:03.030 INFO [9] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://172.21.99.47:5555, host :http://172.21.99.47:5557, host :http://172.21.99.223:5556, host :http://172.21.99.223:5555, host :http://172.21.99.223:5557, host :http://172.21.99.18:5556, host :http://172.21.99.18:5555, host :http://172.21.99.18:5557, host :http://172.21.99.22:5557, host :http://172.21.99.22:5555, host :http://172.21.99.22:5556, host :http://172.21.99.23:5557, host :http://172.21.99.23:5556, host :http://172.21.99.23:5555, host :http://172.21.99.17:5557, host :http://172.21.99.17:5555, host :http://172.21.99.19:5555, host :http://172.21.99.19:5557, host :http://172.21.99.24:5557, host :http://172.21.99.24:5555, host :http://172.21.99.24:5556, host :http://172.21.99.47:5556, host :http://172.21.99.17:5556, host :http://172.21.99.19:5556]
14:27:05.478 ERROR [9] org.openqa.grid.internal.Registry - Unhandled exception in Matcher thread.
java.lang.ClassCastException: com.google.gson.JsonNull cannot be cast to com.google.gson.JsonObject
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.callRemoteGridExtras(SetupTeardownProxy.java:141)
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.killBrowserForCurrentSession(SetupTeardownProxy.java:122)
at com.groupon.seleniumgridextras.grid.proxies.SetupTeardownProxy.getNewSession(SetupTeardownProxy.java:80)
at org.openqa.grid.internal.ProxySet.getNewSession(ProxySet.java:137)
at org.openqa.grid.internal.Registry.takeRequestHandler(Registry.java:282)
at org.openqa.grid.internal.Registry.access$4(Registry.java:281)
at org.openqa.grid.internal.Registry$2.apply(Registry.java:267)
at org.openqa.grid.internal.Registry$2.apply(Registry.java:1)
at org.openqa.grid.internal.NewSessionRequestQueue.processQueue(NewSessionRequestQueue.java:75)
at org.openqa.grid.internal.Registry.assignRequestToProxy(Registry.java:265)
at org.openqa.grid.internal.Registry.access$1(Registry.java:260)
at org.openqa.grid.internal.Registry$Matcher.run(Registry.java:215)
14:27:10.478 INFO [9] org.openqa.grid.internal.ProxySet - Available nodes: [host :http://172.21.99.47:5555, host :http://172.21.99.47:5557, host :http://172.21.99.223:5556, host :http://172.21.99.223:5555, host :http://172.21.99.223:5557, host :http://172.21.99.18:5556, host :http://172.21.99.18:5555, host :http://172.21.99.18:5557, host :http://172.21.99.22:5557, host :http://172.21.99.22:5555, host :http://172.21.99.22:5556, host :http://172.21.99.23:5557, host :http://172.21.99.23:5556, host :http://172.21.99.23:5555, host :http://172.21.99.17:5557, host :http://172.21.99.17:5555, host :http://172.21.99.19:5555, host :http://172.21.99.19:5557, host :http://172.21.99.24:5557, host :http://172.21.99.24:5555, host :http://172.21.99.24:5556, host :http://172.21.99.47:5556, host :http://172.21.99.17:5556, host :http://172.21.99.19:5556]

newSessionWaitTimeout capability is not working

According to Selenium Grid 2 configuration, if 'newSessionWaitTimeout' capability is not set in the HubConfig file, then the value of this capability is set to its default value '-1' which means no timeout for the waiting request. And also all the nodes use this value from the hub if this is set.

Now, I have faced three issues here:

  1. If i dont set any value of this capability in the hubconfig file, then by default it is set as 120000 ms for all the nodes.
  2. If i set any value of this capability in the hubconfig file, then also it is set as 120000 ms for all the nodes.
  3. If i set any value of this capability in the nodeconfig file, then it shows the changed value in the Grid Console but not in effect. Then also after 120000 ms(2 min) all the waiting test requests are timed out.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.