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

192
Views
Selenium javascript util and elementIsEnabled

trying to click remove when input is enabled: https://the-internet.herokuapp.com/dynamic_controls

const { expect } = require("chai"); 
const {Builder,By} = require("selenium-webdriver");
describe("Dynamic controls",function(){
it("Remove/add checkbox",async function(){
    const driver = new Builder().forBrowser("firefox").build();
    await driver.get("https://the-internet.herokuapp.com/dynamic_controls");
    await driver.findElement(By.css("#input-example>button")).click();
    await driver.wait(driver.until.elementIsEnabled(By.CSS('#input-example > input[type=text]')), 30000);        
    await driver.findElement(By.css("#checkbox-example>button")).click();
});

});

I get an error: TypeError: Cannot read property 'elementIsEnabled' of undefined

If I try:

await driver.wait(until.elementIsEnabled(By.CSS('#input-example > input[type=text]')), 30000);

Have other error: ReferenceError: until is not defined

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

0

Right way

await driver.wait(until.elementIsEnabled(driver.findElement(By.css('#input-example > input[type=text]'))), 10000);

elementIsEnabled accepts a webelement

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!