From ea29b42552c69c8679629c4af6a387d66d02c622 Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Thu, 18 Apr 2024 11:56:25 -0500 Subject: [PATCH] #5359 fix locators to be clear --- .../main/java/io/github/com/pages/CardsPage.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/CardsPage.java b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/CardsPage.java index 60a756c41e..db376f662a 100644 --- a/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/CardsPage.java +++ b/jdi-light-vuetify-tests/src/main/java/io/github/com/pages/CardsPage.java @@ -13,27 +13,26 @@ public class CardsPage extends VuetifyPage { - // @todo #5298 Localors should use .v-card class - @UI("//div[@class='container' and .//h2[contains(text(), 'Information Cards')]]/div") + @UI(".//h2[contains(text(), 'Information Cards')]/following::div[contains(@class, 'v-card')]") public static InformationCard informationCard; - @UI("//div[@class='container' and .//h2[contains(text(), 'Outlined Card')]]/div") + @UI(".//h2[contains(text(), 'Outlined Card')]/following::div[contains(@class, 'v-card')]") public static OutlinedCard outlinedCard; - @UI("//div[@class='container' and .//h2[contains(text(), 'Media with text')]]/div") + @UI(".//h2[contains(text(), 'Media with text')]/following::div[contains(@class, 'v-card')]") public static MediaTextCard mediaTextCard; @WaitAfterAction(1) - @UI("//div[@class='container' and .//h2[contains(text(), 'Loading')]]/div") + @UI(".//h2[contains(text(), 'Loading')]/following::div[contains(@class, 'v-card')]") public static LoadingCard loadingCard; @WaitAfterAction(1) - @UI("//div[@class='container' and .//h2[contains(text(), 'Card Reveal')]]/div") + @UI(".//h2[contains(text(), 'Card Reveal')]/following::div[contains(@class, 'v-card')]") public static Card revealCard; - @UI("//div[@class='container' and .//h2[contains(text(), 'Custom Actions')]]/div") + @UI(".//h2[contains(text(), 'Custom Actions')]/following::div[contains(@class, 'v-card')]") public static CustomActionsCard customActionsCard; - @UI("//*[contains(text(), 'Various Attributes Card')]/following-sibling::div//*[contains(@class, 'v-card') and contains(@class, 'v-sheet')]") + @UI(".//h2[contains(text(), 'Various Attributes Card')]/following::div[contains(@class, 'v-sheet')]") public static List variousAttributesCards; }