Pros/cons for using multiple locators per element in Selenium?
问题 I am testing a website which is still in development. Often an element's id, class, text, or position in the DOM will change. And then the locator I've been using will no longer be able to find the element. But the features are still functioning properly. I don't want several tests to fail when there is no actual regression. So instead of having a single locator for each element, I have a collection of locators. public static final ArrayList<By> LOGIN_ANCHOR_LOCATORS = new ArrayList<By>();