Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

284
Visualizações
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 Respostas
Responde à pergunta

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 Relatório

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda