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

553
Views
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 answers
Answer question

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 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!