Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

131
Views
Javascript: cómo configurar "setExperimentalOption" para Chrome

Aparece el mensaje de error "options.setExperimentalOption no es una función" al usar setExperimentalOption.

 var chrome = require("selenium-webdriver/chrome"); let options = await new chrome.Options(); options.setExperimentalOption("excludeSwitches",Arrays.asList("disable-popup-blocking","enable-automation")); options.addArguments("--disable-dev-shm-usage"); options.addArguments('--ignore-certificate-errors'); options.addArguments('--ignore-ssl-errors'); driver = await chrome.Driver.createSession(options);

Amablemente ayuda

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Para Selenium 4, en base a estos api-docs , existe un método excludeSwitches para la opción experimental correspondiente.

 var chrome = require("selenium-webdriver/chrome"); let options = await new chrome.Options(); options.excludeSwitches("disable-popup-blocking", "enable-automation"); options.addArguments("--disable-dev-shm-usage"); options.addArguments('--ignore-certificate-errors'); options.addArguments('--ignore-ssl-errors'); driver = await chrome.Driver.createSession(options);

Y hay una lista de métodos para otras opciones:

 this.headless() → Options this.setChromeBinaryPath( path ) → Options this.setChromeLogFile( path ) → Options this.setChromeMinidumpPath( path ) → Options this.setLocalState( state ) → Options this.setMobileEmulation( config ) → Options this.setPerfLoggingPrefs( prefs ) → Options this.setUserPreferences( prefs ) → Options this.windowSize( size ) → Options
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!