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

552
Vistas
Python Selenium - How to call embedded javascripts?

I would like to write a Python script to automate a process. Therefore I need interact with a webinterface. I installed Selenium and I'm able to call my webinterface and to login. Now I see a bunch of buttons but I can't just simply find them as an element as those are embedded in .js files. I can see them when I click in the browser on 'View Page source':

<script src="web/js/deviceWindow.js"></script>

When I click on deviceWindow.js I can see the Button where I want to click on:

this.setupButton = new Button();
this.setupButton.setText('Settings');
this.setupButton.text.addClass('configBtn');

How can I add this button click to my Python script?

from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Chrome('./chromedriver')

driver.get('http://10.143.140.220/login.html')

password = driver.find_element_by_name('password')
password.clear()
password.send_keys('password')
password.send_keys(Keys.RETURN)

I would appreciate any help :-) Thanks!

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

Your question is unclear, however.. is this helpful?

from selenium.webdriver.support import expected_conditions as EC
[...]

button = WebDriverWait(browser, 10).until(EC.element_to_be_clickable((By.XPATH, "//*[contains(text(), 'Settings')]")))
button.click()
about 4 years ago · Santiago Gelvez Denunciar
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