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

458
Vistas
Error using Selenium Chrome Webdriver with JavaScript

I read document Selenium and try to code as document. I run code, it open browsers chrome ok. But it has problem, I don't know where it appears the console.log statement?. Because I search on f12 Console tab in Chrome or Visual Studio Code does not appear console.log. Help me!

Thank you everyone

Browser Google Chrome: Version 97.0.4692.71 and ChromeDriver 98.0.4758.48

I installed some library in project

chromedriver: "^97.0.0" selenium-webdriver: "^4.1.1"

This is my code:

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

async function DisplayListElement() {
  let options = new chrome.Options();
  let driver = await new Builder()
    .forBrowser("chrome")
    .setChromeOptions(options)
    .build();
  try {
    // Navigate to Url
    await driver.get("https://www.example.com");
    // Get all the elements available with tag 'p'
    let elements = await driver.findElements(By.css("p"));
    for (let e of elements) {
      console.log(await e.getText());
    }
  } finally {
    await driver.quit();
  }
}
DisplayListElement();

It was some problem when was running as follow:

[7476:8716:0117/152805.277:ERROR:chrome_browser_main_extra_parts_metrics.cc(227)] START: ReportBluetoothAvailability(). If you don't see the END: message, this is crbug.com/1216328.
[7476:8716:0117/152805.310:ERROR:chrome_browser_main_extra_parts_metrics.cc(230)] END: ReportBluetoothAvailability()
[7476:8716:0117/152805.316:ERROR:chrome_browser_main_extra_parts_metrics.cc(235)] START: GetDefaultBrowser(). If you don't see the END: message, this is crbug.com/1216328.
[7476:9600:0117/152805.335:ERROR:device_event_log_impl.cc(214)] [15:28:05.335] USB: usb_device_handle_win.cc:1050 Failed to read descriptor from node connection: A device attached toce attached to not functioning. (0x1F)
[7476:9600:0117/152805.335:ERROR:device_event_log_impl.cc(214)] [15:28:05.335] USB: usb_device_handle_win.cc:1050 Failed to read descr                                  ce attached toiptor from node connection: A devievice_event_log_impl.cc(214)] [15:28:05.566] USB: usb_device_handle_win.cc:1050 Failed to read descriptor from node connection: A devi[7476:9600:0117/152805.335:ERROR:device_event_log_impl.cc(214)] [15:28:05.335] USB: usb_device_handle_win.cc:1050 Failed to read descr117/152805.566:ERROR:device_event_log_impl.cc(214)] [15:28:05.566] USB: usb_device_handle_win.cc:1050 Failed to read descr. (0x1F)
[7476:9600:0117/152805.566:ERROR:device_event_log_impl.cc(214)] [15:28:05.566] USB: usb_device_handle_win.cc:1050 Failed to read descriptor from node connection: A device attached toonnection: A device attached to the system is not functioning. (0x1F)
[7476:8716:0117/152805.687:ERROR:chrome_browser_main_extra_parts_metrics.cc(239)] END: GetDefaultBrowser()
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