From 9bfb699fb433fb035c2d0e4d517a3e9ddb0b41d0 Mon Sep 17 00:00:00 2001 From: michaeljacob Date: Mon, 17 Jul 2023 09:48:08 +0100 Subject: [PATCH] waitForElement --- test/end-to-end/pages/annotationsAndComments/updateComment.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/end-to-end/pages/annotationsAndComments/updateComment.js b/test/end-to-end/pages/annotationsAndComments/updateComment.js index b70ff9035..99a892862 100644 --- a/test/end-to-end/pages/annotationsAndComments/updateComment.js +++ b/test/end-to-end/pages/annotationsAndComments/updateComment.js @@ -5,7 +5,9 @@ const testConfig = require("../../../config"); module.exports = async function (comment, updatedComment) { const I = this; - await I.retry(3).click(`//p[contains(text(), '${comment}')]`); + const commentElement = `//p[contains(text(), '${comment}')]`; + await I.waitForElement(commentElement); + await I.click(commentElement); await I.waitForElement(commonConfig.editButton); await I.click(commonConfig.editButton); await I.waitForElement(commonConfig.clearFiledXp);