Public | Automated Build

Last pushed: 7 days ago
Short Description
Short description is empty for this repo.
Full Description

Selenium Grid Node - Chrome

Selenium Node configured to run Google Chrome.

Dockerfile

selenium/node-chrome Dockerfile

How to use this image

First, you will need a Selenium Grid Hub that the Node will connect to.

$ docker run -d -P --name selenium-hub selenium/hub

Once the hub is up and running will want to launch nodes that can run tests. You can run as many nodes as you wish.

$ docker run -d --link selenium-hub:hub selenium/node-chrome

What is Selenium?

Selenium automates browsers. That's it! What you do with that power is entirely up to you. Primarily, it is for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) also be automated as well.

Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.

See the Selenium site for documation on usage within your test code.

License

View license information for the software contained in this image.

Getting Help

User Group

The first place where people ask for help about Selenium is the Official User Group. Here, you'll find that most of the time, someone already found the problem you are facing right now, and usually reached the solution for which you are looking.

Note: Please make sure to search the group before asking for something. Your question likely won't get answered if it was previously answered in another discussion!

Chat Room

The best place to ask for help is the user group (because they also keep the information accessible for others to read in the future). However, if you have a very important (or too simple) issue that needs a solution ASAP, you can always enter the IRC chat room. You might just find someone ready to help on #selenium at Freenode.

Issues

If you have any problems with or questions about this image, please contact us through a Github issue. If you have any problems with or questions about Selenium, please contact us through Selenium's Bug Tracker.

Contributing

There are many ways to contribute whether by answering user questions, additional docs, or pull request we look forward to hearing from you.

If you do supply a patch we will need you to sign the CLA. We are part of SFC

Docker Pull Command
Owner
selenium
Source Repository

Comments (13)
anubhahive
4 days ago

How can I specify the version of browser while running the node

timjarvis
8 days ago

ok so I figured it out.

docker run -d --network <yournetwork> -e HUB_PORT_4444_TCP_ADDR=<yourhubname> -e HUB_PORT_444_TCP_PORT=444 selenium/node-chrome

timjarvis
8 days ago

According to the Docker docs - "Warning: The --link flag is a deprecated lagacy feature of Docker. It may eventually be removed." - They go on to say that we should use docker networking instead.

My question is - how do we register nodes to a hub using networking ?

lucst
5 months ago

I have spent some time to blend all pieces. And here is solution which works:

docker network create -d overlay selenium-grid

docker service create --network selenium-grid --name selenium-hub -p 4444:4444 selenium/hub:3.4.0

docker service create --network selenium-grid --endpoint-mode dnsrr --name chrome --mount type=bind,source=/dev/shm,target=/dev/shm -e HUB_PORT_4444_TCP_ADDR=selenium-hub -e HUB_PORT_4444_TCP_PORT=4444 --replicas 1 -e NODE_MAX_INSTANCES=5 -e NODE_MAX_SESSION=3 selenium/node-chrome:3.4.0 bash -c 'SE_OPTS="-host $HOSTNAME -port 5555" /opt/bin/entry_point.sh'

docker service create --network selenium-grid --endpoint-mode dnsrr --name firefox --mount type=bind,source=/dev/shm,target=/dev/shm -e HUB_PORT_4444_TCP_ADDR=selenium-hub -e HUB_PORT_4444_TCP_PORT=4444 --replicas 1 -e NODE_MAX_INSTANCES=5 -e NODE_MAX_SESSION=3 selenium/node-firefox:3.4.0 bash -c 'SE_OPTS="-host $HOSTNAME -port 5555" /opt/bin/entry_point.sh'

geostant
8 months ago

You can overwrite environment variables by passing -e flag in your run command.

You can pass the following environment:
NODE_MAX_INSTANCES=1
NODE_MAX_SESSION=1
NODE_REGISTER_CYCLE=5000
NODE_PORT=5555

venkatesen0
a year ago

RUN wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list && apt-get update -qqy && apt-get -qqy install google-chrome-stable && rm /etc/apt/sources.list.d/google-chrome.list && rm -rf /var/lib/apt/lists/*

gpg: no valid OpenPGP data found.

Getting the above error when building from Dockerfile.

venkatesen0
a year ago

Request team to make the dockerfile generic to add a version parameter like firefox, so that we can build different versions of chrome nodes.

freddyvega
2 years ago

couldn't you edit the config.json and up the maxinstances to 5?

eg: "maxInstances": 5

vikramvi
2 years ago

Hi,

docker run -d --link selenium-hub:hub selenium/node-chrome gets struck with below output

Pulling repository docker.io/selenium/node-chrome

not sure if I'm doing something wrong here , please clarify

Thanks in advance
Vikram

mcowan
2 years ago

Question: How do I send parameters to the node when I start it? Specifically I want to change the name?