From 1861be716a5d14903e385df3bf7a53496237d027 Mon Sep 17 00:00:00 2001 From: Brandon Kobel Date: Mon, 7 Jan 2019 13:04:33 -0800 Subject: [PATCH] Awaiting element.isEnabled for staleness checks (#28106) The functional test runner's find service wasn't awaiting the promises returned by element.isEnabled which was causing some of the staleness checks to not succeed and potentially crash the process if it was the very last test to be run. --- test/functional/services/find.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/functional/services/find.js b/test/functional/services/find.js index 16a18a67978a..753e81fce49b 100644 --- a/test/functional/services/find.js +++ b/test/functional/services/find.js @@ -64,7 +64,7 @@ export function FindProvider({ getService }) { return await retry.try(async () => { const element = await getElementFunction(); // Calling any method forces a staleness check - element.isEnabled(); + await element.isEnabled(); return element; }); } @@ -75,7 +75,7 @@ export function FindProvider({ getService }) { return await retry.try(async () => { const element = await getElementFunction(leadfootWithTimeout); // Calling any method forces a staleness check - element.isEnabled(); + await element.isEnabled(); return element; }); } finally {