Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
selenium js 3.6 attempt to wait until element is clickable
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');
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