Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

241
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda