From 254e6ea78aff5187cc4c54d639e5d2f067f7274f Mon Sep 17 00:00:00 2001 From: SS Date: Mon, 24 Feb 2020 17:51:31 +0100 Subject: [PATCH] Updated to click the firstVisibleElement Earlier it seems like it was clicking the first element. Now it clicks the first visible element, --- lib/helper/TestCafe.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/helper/TestCafe.js b/lib/helper/TestCafe.js index 5a084f9d7..6c789ed3d 100644 --- a/lib/helper/TestCafe.js +++ b/lib/helper/TestCafe.js @@ -1208,7 +1208,7 @@ async function proceedClick(locator, context = null) { await assertElementExists(els, locator, 'Clickable element'); } - const firstElement = await els.nth(0); + const firstElement = await els.filterVisible().nth(0); return this.t .click(firstElement)