public static function humanReadableString($selector)
    {
        if (is_string($selector)) {
            return "'$selector'";
        }
        if (is_array($selector)) {
            $type = strtolower(key($selector));
            $locator = $selector[$type];
            return "$type '$locator'";
        }
        if (class_exists('\Facebook\WebDriver\WebDriverBy')) {
            if ($selector instanceof WebDriverBy) {
                $type = $selector->getMechanism();
                $locator = $selector->getValue();
                return "$type '$locator'";
            }
        }
        throw new \InvalidArgumentException("Unrecognized selector");
    }
public static function humanReadableString($selector)
    {
        if (is_string($selector)) {
            return "'$selector'";
        }
        if (is_array($selector)) {
            $type = strtolower(key($selector));
            $locator = $selector[$type];
            return "$type '$locator'";
        }
        if (class_exists('\Facebook\WebDriver\WebDriverBy')) {
            if ($selector instanceof WebDriverBy) {
                $type = $selector->getMechanism();
                $locator = $selector->getValue();
                return "$type '$locator'";
            }
        }
        throw new \InvalidArgumentException("Unrecognized selector");
    }
public static function humanReadableString ( $ selector ) { if ( is_string ( $ selector ) ) { return "'$selector'" ; } if ( is_array ( $ selector ) ) { $ type = strtolower ( key ( $ selector ) ) ; $ locator = $ selector [ $ type ] ; return "$type '$locator'" ; } if ( class_exists ( '\Facebook\WebDriver\WebDriverBy' ) ) { if ( $ selector instanceof WebDriverBy ) { $ type = $ selector -> getMechanism ( ) ; $ locator = $ selector -> getValue ( ) ; return "$type '$locator'" ; } } throw new \ InvalidArgumentException ( "Unrecognized selector" ) ; }
Transforms strict locator, \Facebook\WebDriver\WebDriverBy into a string represenation

@param $selector

@return string
Transforms strict locator \ Facebook \ WebDriver \ WebDriverBy into a string represenation