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

237
Views
NoSuchElementError: Unable to locate element

I'm using Selenium WebDriver to search in Salesforce AppExchange. This code worked before, but for some reason it has stopped working due to element not been found. I've tried using several different suggestions over the network:

await driver.get("https://appexchange.salesforce.com/");
        for (i = 0; i < searchWords.length; i++) {
            /*await driver.wait(until.elementLocated(By.xpath('//input[@class="bar-input"]')),20000, 'Timed out after 20 seconds', 4000).then(elem =>{
                elem.sendKeys(`${searchWords[i]}`, webdriver.Key.ENTER);
             });*/
            search = await driver.findElement(By.xpath('//input[@class="bar-input"]'));
            await driver.wait(until.elementIsVisible(search),100);
            //search = await driver.findElement(By.css('.bar-input'));
Some are in comment due to the different attempts... The "wait(until.elementLocated" fails everytime. The driver.wait fails: NoSuchElementError: Unable to locate element: //input[@class="bar-input"] I've tried css, xpath, By.class, full xpath...

I've tried both ChromeDriver and FireFoxDriver. Would appreciate any insight on this

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!