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

1K
Vistas
WebDriverError: unknown error: net::ERR_CONNECTION_REFUSED

Hi tried to run selenium test in docker.

const { Builder, By} = require("selenium-webdriver");
const chrome = require('selenium-webdriver/chrome');
const assert = require('assert')

async function addCadastreTest() {
    const options = new chrome.Options()
    options.setAcceptInsecureCerts(true)
    let driver = await new Builder()
        .forBrowser("chrome")
        .usingServer('http://localhost:4444/wd/hub')
        .setChromeOptions(options)
        .build();
    
    await driver.get("http://localhost:3000/");
    await driver.findElement(By.id("fit")).click()

    assert(await driver.switchTo().alert().getText() == "Quel est le nom de votre commune ?")
    {
      const alert = await driver.switchTo().alert()
      await alert.sendKeys("Lons le Saunier")
      await alert.accept()

    }
    await driver.quit();
}
addCadastreTest();

This is the stacktrace of the error :

mapbox\node_modules\selenium-webdriver\lib\error.js:522
    let err = new ctor(data.message)
              ^

WebDriverError: unknown error: net::ERR_CONNECTION_REFUSED
  (Session info: chrome=102.0.5005.61)
    at Object.throwDecodedError mapbox\node_modules\selenium-webdriver\lib\error.js:522:15)
    at parseHttpResponse (mapbox\node_modules\selenium-webdriver\lib\http.js:549:13)
    at Executor.execute (mapbox\node_modules\selenium-webdriver\lib\http.js:475:28)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async Object.execute (mapbox\node_modules\selenium-webdriver\lib\webdriver.js:735:17)
    at async addCadastreTest (mapbox\test\addCadastre.spec.js:14:5) {
  remoteStacktrace:

I'm stuck because i tried to run this test in java with selenium in docker and it work but in JavaScript i get this weird error connection refused. If someone have a thought to solve my problem thank.

about 4 years ago · Juan Pablo Isaza
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