Last active
December 19, 2018 13:26
-
-
Save benjiwheeler/6e67757ead69cbce9aa2dc3d2e327b59 to your computer and use it in GitHub Desktop.
selenium js 3.6 attempt to wait until element is clickable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const costumesTabElement = await findByText('Costumes'); | |
await driver.wait(() => { | |
return costumesTabElement.isDisplayed().then(displayed => { | |
console.log('got here A'); | |
if (!displayed) return false; | |
console.log('got here B'); | |
// costumesTabElement.click(); | |
return costumesTabElement.isEnabled(); | |
}); | |
}); | |
console.log('got here C'); | |
await clickText('Costumes'); | |
await new Promise(resolve => setTimeout(resolve, 3000)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment