@@ -93,7 +93,7 @@ public <T extends IElement> List<T> findElements(By locator, String name, IEleme
9393 for (int index = 1 ; index <= webElements .size (); index ++) {
9494 WebElement webElement = webElements .get (index - 1 );
9595 String currentName = String .format ("%1$s %2$s" , namePrefix , index );
96- T element = supplier .get (generateXpathLocator (locator , webElement , index ), currentName , state );
96+ T element = supplier .get (generateLocator (locator , webElement , index ), currentName , state );
9797 list .add (element );
9898 }
9999 return list ;
@@ -126,6 +126,18 @@ public <T extends IElement> List<T> findElements(By locator, String name, Class<
126126 return findElements (locator , name , elementSupplier , count , state );
127127 }
128128
129+ /**
130+ * Generates locator for target element.
131+ *
132+ * @param multipleElementsLocator locator used to find elements.
133+ * @param webElement target element.
134+ * @param elementIndex index of target element.
135+ * @return target element's locator
136+ */
137+ protected By generateLocator (By multipleElementsLocator , WebElement webElement , int elementIndex ) {
138+ return generateXpathLocator (multipleElementsLocator , webElement , elementIndex );
139+ }
140+
129141 /**
130142 * Generates xpath locator for target element.
131143 *
0 commit comments