Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

283
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda