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

215
Views
Problema con WindowHandlers en Nightwatch.js

tipo. Llevo más de 5 horas con este problema en Nightwatch.js (javascript) y no importa lo que intenté, obtengo 2 resultados, no pude encontrar una solución.

Lo que quiero hacer: la aplicación que estoy tratando de probar abre una nueva ventana y necesito cambiar el enfoque en la pestaña para continuar con la prueba. Para el código traté de usar el siguiente comando:

 var handle = result.value[1]; this.switchToWindow(handle); })´´´ after this I recieved the following error messege: Error while running .switchToWindow() protocol action: An unknown error has occurred – invalid argument: 'handle' must be a string then I tried to convert the result to string but give the same problem after that I found this possible solution on internet: ```var secondTab = ChromeDriver.getAllWindowHandles()[1]; ChromeDriver.switchWindow(secondTab); this.demoTestAsync = async function (browser) { const result = await browser.windowHandles(); var handle = result.value[0]; browser.switchToWindow(handle); }´´´ then gives me the following error; TypeError: ChromeDriver.getAllWindowHandles is not a function - writing an ES6 async test case? - keep in mind that commands return a Promise; - writing unit tests? - make sure to specify "unit_tests_mode=true" in your config. at Object.Agregar Vtos. Generales a Mi Calendario (C:\proyectos\NightWatch_CI\tests\ci\venc_contrib copy.js:25:34) at processTicksAndRejections (node:internal/process/task_queues:96:5) At the end only gets the same results no matter what I try to do, or one or another. If someone could tell me what I'm doing wrong I would really appreaciate it.
about 4 years ago · Juan Pablo Isaza
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!