diff --git a/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift b/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift index 3db4d07a04a2..8948da7c03dd 100644 --- a/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift +++ b/WordPress/UITestsFoundation/Screens/NotificationsScreen.swift @@ -115,9 +115,9 @@ public class NotificationsScreen: ScreenObject { public func likeComment() -> Self { - let isCommentTextDisplayed = app.webViews.staticTexts.firstMatch.waitForExistence(timeout: 15) + let isCommentOnTextDisplayed = app.staticTexts["Comment on"].firstMatch.waitForExistence(timeout: 5) - if isCommentTextDisplayed { + if isCommentOnTextDisplayed { likeCommentButton.tap() }