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

262
Visualizações
How to run webdriver tests on docker firefox-standalone-debug container instead of regular firefox browser

I have a regular Firefox installed on my Linux Ubuntu as well as docker-firefox-standalone-debug container. Moreover I have Xfvb and I set DISPLAY overthere. Now when I run my Webdriver test from Jenkins everything works fine and my test runs on regular Firefox. But the problem is that I would like to start my test now on docker-firefox-standalone-debug container. Can anyone tell me how to force my test on Jenkins to run on docker? By default it starts on regular Firefox and I don't now how to tell him yo run on docker-firefox-debug?

about 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You'll need to use the remote web driver instead of the regular WebDriver.

For example if you run your conatiner as follows:

docker run -d -p 4444:4444 selenium/standalone-firefox-debug

Use the follwing code:

RemoteWebDriver driver = new RemoteWebDriver(
                    new URL("http://localhost:4444/wd/hub"),
                    DesiredCapabilities.firefox());

Instead of:

WebDriver driver = new FirefoxDriver();

Regards

about 4 years ago · Santiago Trujillo Relatório

0

I run:

docker run -d -p 32780:4444 -p 5999:5900 selenium/standalone-firefox-debug

so when I type

docker ps

I have

6b7fa91575ae selenium/standalone-firefox-debug "/opt/bin/entry_point" 8 seconds ago Up 6 seconds 0.0.0.0:32780->4444/tcp, 0.0.0.0:5999->5900/tcp

then in my code:

RemoteWebDriver driver = new RemoteWebDriver( 
                                new URL("http://192.168.99.100:32780/wd/hub"), 
                                DesiredCapabilities.firefox());

This works :)

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