문제

We are running selenium Grid 2 and have various machines connecting back to the hub. As the network runs DHCP the nodes cycle IP addresses quite frequently.

Is there anyway to have the Hub show the hostnames of the connected nodes rather than the IP address when I look at the hub status from
http://myseleniumgridhub:4444/grid/console?config=true&configDebug=true

I have looked through the JSON configuration options for a node but havent seen anything but browser name (Which doesnt quite fit the task as all the nodes are running the same browser)

도움이 되었습니까?

해결책

when you run your node pass in the -host parameter and specify your hostname

 java -jar ./selenium-server-standalone-2.25.0.jar -role node -host HOSTNAME -port 5555 -maxSession 20 -timeout 30000 -hub http://hubhost:4444/grid/register -browser browserName=*googlechrome,maxInstances=8

then in the grid/console website it will show the node registered as the hostname rather than the IP: listening on http:// HOSTNAME :5555

If using a JSON file with -nodeConfig instead, you can add "host":"HOSTNAME" to the "configuration" object in your JSON file (see here)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top