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

121
Views
¿Cómo realizar clics en BrowserWindow de una aplicación Electron?

Estoy escribiendo y la aplicación Electron. Tiene una ventana principal del navegador. Luego, desde allí, abro otra ventana del BrowserWindow . Ahora quiero hacer clic programáticamente en un botón que está presente en la ventana del navegador secundario. ¿Cómo puedo lograr eso?

Supongamos que mi código en el proceso de renderizado de la ventana principal es el siguiente:

 const childWindow = new BrowserWindow({ width: 800, height: 600, }) childWindow.loadUrl('...') // wait for the window to settle setTimeout(()=>{ // the code to click the button }, 3000)
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puede hacer uso de precargas, que son básicamente scripts que se ejecutan dentro de una ventana del navegador Electron

 const childWindow = new BrowserWindow({ width: 800, height: 600, webPreferences: { preload: path.join(/* path to preload script*/), contextIsolation: false, enableRemoteModule: true } }) childWindow.loadUrl('...')
 // my preload script document.addEventListener('DOMContentLoaded', () => { //get your element using getElementById or querySelector.. etc // then perform the .click() on that element });
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!