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'));
I've tried both ChromeDriver and FireFoxDriver. Would appreciate any insight on this