Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

282
Views
How to Set Capabilities on Node Browser with selenium Docker

I am new with selenium docker. I want to create a Chrome/Firefox node with capabilities (Selenium Grid). How to add capabilities when I add a Selenium Node docker container? I found this command so far...

 docker run -d --link selenium-hub:hub selenium/node-firefox:2.53.0

but I don't know how to add capabilities on it. Already use this command but not working.

 docker run -d --link selenium-hub:hub selenium/node-firefox:2.53.0 -browser browserName=firefox,version=3.6,maxInstances=5,platform=LINUX
about 4 years ago · Santiago Trujillo
2 answers
Answer question

0

Solved... adding SE_OPTS will help you to set capabilites

docker run -d -e SE_OPTS="-browser browserName=chromeku,version=56.0,maxInstances=3,platform=WINDOWS" --link selenium-hub:hub selenium/node-chrome:2.53.0
about 4 years ago · Santiago Trujillo Report

0

There are multiple ways of doing this and SE_OPTS is one of them, however for me it complicated what I was trying to accomplish. Using SE_OPTS forced me to set capabilities I didn't want to change, otherwise they would be reset to blank/null

I wanted to do:

SE_OPTS=-browser applicationName=Testing123

but I was forced to do:

SE_OPTS=-browser applicationName=Testing123,browserName=firefox,maxInstances=1,version=59.0.1

Another way to set capabilities is to supply your own config.json

-nodeConfig /path/config.json

You can find a default config.json

Or you can start the node container and copy the current one from it

docker cp <containerId>:/opt/selenium/config.json /host/path/target

You can also take a look at entry_point.sh, either on github or on the running container:

/opt/bin/entry_point.sh   

You can run bash on the node container via:

sudo docker exec -i -t <container> bash

This will let you see how SE_OPTS is used and how config.json is generated. Note config.json is generated only if you don't supply one.

/opt/bin/generate_config   

By examining generate_config you can see quite a few ENV vars such as: FIREFOX_VERSION, NODE_MAX_INSTANCES, NODE_APPLICATION_NAME etc.

This leads to the third way to set capabilities which is to set the environment variables being used by generate_config, in my case APPLICATION_NODE_NAME

docker run -d -e "NODE_APPLICATION_NAME=Testing123"

Finally, when using SE_OPTS be careful not to accidentally change values. Specifically, the browser version. You can see by looking at entry_point.sh the browser version is calculated.

FIREFOX_VERSION=$( firefox -version | cut -d " " -f 3 )

If you change it to something else you will not get the results you are looking for.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!