From a6c485581d8fbe17636312f16c9a866415917c1c Mon Sep 17 00:00:00 2001 From: Natalia Pozhidaeva Date: Thu, 25 Apr 2024 22:03:18 -0500 Subject: [PATCH] #5339 fix locator --- .../main/java/io/github/com/pages/displaydata/IconsPage.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/jdi-light-material-ui-tests/src/main/java/io/github/com/pages/displaydata/IconsPage.java b/jdi-light-material-ui-tests/src/main/java/io/github/com/pages/displaydata/IconsPage.java index ff61503377..d6ffc96c05 100644 --- a/jdi-light-material-ui-tests/src/main/java/io/github/com/pages/displaydata/IconsPage.java +++ b/jdi-light-material-ui-tests/src/main/java/io/github/com/pages/displaydata/IconsPage.java @@ -12,11 +12,10 @@ public class IconsPage extends WebPage { @UI(".MuiGrid-grid-xs-8 > svg") public static List simpleIcons; - // @todo #5297 Fix locator to be more stable against div - @UI("//p[@id='colorLastClick']/..//div/*") + @UI("//h2[text()='Color']/following::div[1]//*[contains(@class, 'MuiSvgIcon-root')]") public static List colorIcons; - @UI("//p[@id='sizeLastClick']/..//div/*") + @UI("//h2[text()='Size']/following::div[1]//*[contains(@class, 'MuiSvgIcon-root')]") public static List differentSizesIcons; @UI("#simpleLastClick")