
com.jdiai.tools.TestIDLocators Maven / Gradle / Ivy
package com.jdiai.tools;
import org.openqa.selenium.By;
import java.util.function.Function;
import static com.epam.jdi.tools.StringUtils.toKebabCase;
import static org.openqa.selenium.By.*;
public class TestIDLocators {
public static final Function DATA_TEST_ID = fieldName ->
cssSelector("[data-testid='" + toKebabCase(fieldName) + "']");
public static final Function ID_LOCATOR = fieldName ->
id(toKebabCase(fieldName));
public static final Function CLASS_LOCATOR = fieldName ->
className(toKebabCase(fieldName));
public static final Function NAME_LOCATOR = fieldName ->
name(toKebabCase(fieldName));
public static Function SMART_LOCATOR = DATA_TEST_ID;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy