@@ -261,6 +261,7 @@ default <T extends IElement> T findChildElement(IElement parentElement, By child
261261 /**
262262 * Find list of elements
263263 *
264+ * @param <T> Type of the target elements.
264265 * @param locator Elements selector
265266 * @param name elements' name.
266267 * @param type Type of elements to be obtained
@@ -339,4 +340,128 @@ default <T extends IElement> List<T> findElements(By locator, String name, Eleme
339340 default <T extends IElement > List <T > findElements (By locator , ElementType type , ElementsCount count ) {
340341 return findElements (locator , type , count , ElementState .DISPLAYED );
341342 }
343+
344+
345+ /**
346+ * Finds displayed child elements by their locator relative to parent element.
347+ *
348+ * @param <T> Type of the target elements.
349+ * @param parentElement Parent element for relative search of child elements.
350+ * @param childLoc Locator of child elements relative to its parent.
351+ * @param type Type of elements to be obtained
352+ * @return List of child elements.
353+ */
354+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc , ElementType type ) {
355+ return findChildElements (parentElement , childLoc , type , ElementsCount .ANY );
356+ }
357+
358+ /**
359+ * Finds displayed child elements by their locator relative to parent element.
360+ *
361+ * @param <T> Type of the target elements.
362+ * @param parentElement Parent element for relative search of child elements.
363+ * @param childLoc Locator of child elements relative to its parent.
364+ * @param type Type of elements to be obtained
365+ * @param count Expected number of elements that have to be found (zero, more then zero, any).
366+ * @return List of child elements.
367+ */
368+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc , ElementType type ,
369+ ElementsCount count ) {
370+ return findChildElements (parentElement , childLoc , type , count , ElementState .DISPLAYED );
371+ }
372+
373+ /**
374+ * Finds child elements by their locator relative to parent element.
375+ *
376+ * @param <T> Type of the target elements.
377+ * @param parentElement Parent element for relative search of child elements.
378+ * @param childLoc Locator of child elements relative to its parent.
379+ * @param type Type of elements to be obtained
380+ * @param state Visibility state of child elements.
381+ * @return List of child elements.
382+ */
383+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc ,
384+ ElementType type , ElementState state ) {
385+ return findChildElements (parentElement , childLoc , type , ElementsCount .ANY , state );
386+ }
387+
388+ /**
389+ * Finds child elements by their locator relative to parent element.
390+ *
391+ * @param <T> Type of the target elements.
392+ * @param parentElement Parent element for relative search of child elements.
393+ * @param childLoc Locator of child elements relative to its parent.
394+ * @param type Type of the element to be obtained
395+ * @param count Expected number of elements that have to be found (zero, more then zero, any).
396+ * @param state Visibility state of child elements.
397+ * @return List of child elements.
398+ */
399+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc , ElementType type ,
400+ ElementsCount count , ElementState state ) {
401+ return findChildElements (parentElement , childLoc , null , type , count , state );
402+ }
403+
404+ /**
405+ * Finds displayed child elements by their locator relative to parent element.
406+ *
407+ * @param <T> Type of the target elements.
408+ * @param parentElement Parent element for relative search of child elements.
409+ * @param childLoc Locator of child elements relative to its parent.
410+ * @param name Child elements name.
411+ * @param type Type of the element to be obtained
412+ * @return List of child elements.
413+ */
414+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc ,
415+ String name , ElementType type ) {
416+ return findChildElements (parentElement , childLoc , name , type , ElementsCount .ANY );
417+ }
418+
419+ /**
420+ * Finds displayed child elements by their locator relative to parent element.
421+ *
422+ * @param <T> Type of the target elements.
423+ * @param parentElement Parent element for relative search of child elements.
424+ * @param childLoc Locator of child elements relative to its parent.
425+ * @param name Child elements name.
426+ * @param type Type of the element to be obtained
427+ * @param count Expected number of elements that have to be found (zero, more then zero, any).
428+ * @return List of child elements.
429+ */
430+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc , String name ,
431+ ElementType type , ElementsCount count ) {
432+ return findChildElements (parentElement , childLoc , name , type , count , ElementState .DISPLAYED );
433+ }
434+
435+ /**
436+ * Finds child elements by their locator relative to parent element.
437+ *
438+ * @param <T> Type of the target elements.
439+ * @param parentElement Parent element for relative search of child elements.
440+ * @param childLoc Locator of child elements relative to its parent.
441+ * @param name Child elements name.
442+ * @param type Type of the element to be obtained
443+ * @param state Visibility state of child elements.
444+ * @return List of child elements.
445+ */
446+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc , String name ,
447+ ElementType type , ElementState state ) {
448+ return findChildElements (parentElement , childLoc , name , type , ElementsCount .ANY , state );
449+ }
450+
451+ /**
452+ * Finds child elements by their locator relative to parent element.
453+ *
454+ * @param childLoc Locator of child elements relative to its parent.
455+ * @param type Type of the element to be obtained
456+ * @param name Child elements name.
457+ * @param parentElement Parent element for relative search of child elements.
458+ * @param count Expected number of elements that have to be found (zero, more then zero, any).
459+ * @param state Visibility state of target elements.
460+ * @param <T> Type of the target elements.
461+ * @return List of child elements.
462+ */
463+ default <T extends IElement > List <T > findChildElements (IElement parentElement , By childLoc , String name ,
464+ ElementType type , ElementsCount count , ElementState state ) {
465+ return findChildElements (parentElement , childLoc , name , type .getClazz (), count , state );
466+ }
342467}
0 commit comments