I have attempted the following methods:
driver.wait(function() {
return driver.isElementPresent(webdriver.findElement(By.xpath("//*[contains(text(),'Vanilla Sky Final Scene')]")))
}, 20000).then(function() {
console.log('worked')
})
as well as this:
driver.wait(function() {
return driver.isElementPresent(driver.findElement(By.xpath("//*[contains(text(),'Vanilla Sky Final Scene')]")))
}, 20000).then(function() {
console.log('worked')
})
And this:
driver.wait(function() {
return driver.findElement(By.xpath("//*[contains(text(),'Vanilla Sky Final Scene')]")))
}, 20000).then(function() {
console.log('worked')
})
Unfortunately, none of these approaches are yielding the desired results. Can someone suggest the correct way to achieve this?