public static RemoteWebElement locateElement(String locator, ParentTraits parent) {
        logger.entering(new Object[] { locator, parent });
        Preconditions.checkArgument(StringUtils.isNotBlank(locator), INVALID_LOCATOR_ERR_MSG);
        Preconditions.checkArgument(parent != null, INVALID_PARENT_ERR_MSG);
        RemoteWebElement element = parent.locateChildElement(locator);
        logger.exiting(element);
        return element;
    }
public static RemoteWebElement locateElement ( String locator , ParentTraits parent ) { logger . entering ( new Object [ ] { locator , parent } ) ; Preconditions . checkArgument ( StringUtils . isNotBlank ( locator ) , INVALID_LOCATOR_ERR_MSG ) ; Preconditions . checkArgument ( parent != null , INVALID_PARENT_ERR_MSG ) ; RemoteWebElement element = parent . locateChildElement ( locator ) ; logger . exiting ( element ) ; return element ; }
Parses locator string to identify the proper By subclass before calling Selenium
{@link WebElement#findElement(By)} to locate the web element nested within the parent web element.

@param locator
String that represents the means to locate this element (could be id/name/xpath/css locator).
@param parent
{@link ParentTraits} object that represents the parent element for this element.
@return {@link RemoteWebElement} that represents the html element that was located using the locator provided.