Skip to content

Enhance the SmartDriverUtil to include a findAncestor #26

@chrisdavis83

Description

@chrisdavis83

Considering the following method:

/**
 *
 * Finds the webfriend of a child elements parent
 *
 * @param driver the web driver
 * @param childElement the child web element
 * @param elementTag the element tag to wrap element with
 * @param <T> the web friends element type returned
 * @param <I> the web friends element type input
 * @return
 */
public static <T extends SElement, I extends SElement> T findWebFriendParent(final SmartDriver driver, final I childElement, final TagTypeSelenium<T> elementTag) {
	return findWebFriendParent(driver, childElement.getWebElement(), elementTag);
}

Could we add to it where it iterates up through the html tree looking for an ancestor which matches a webfriends element type

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions