public function elementAttributeExists($selectorType, $selector, $attribute)
    {
        $element = $this->elementExists($selectorType, $selector);

        $message = sprintf(
            'The attribute "%s" was not found in the %s.',
            $attribute,
            $this->getMatchingElementRepresentation($selectorType, $selector)
        );

        $this->assertElement($element->hasAttribute($attribute), $message, $element);

        return $element;
    }
public function elementAttributeExists($selectorType, $selector, $attribute)
    {
        $element = $this->elementExists($selectorType, $selector);

        $message = sprintf(
            'The attribute "%s" was not found in the %s.',
            $attribute,
            $this->getMatchingElementRepresentation($selectorType, $selector)
        );

        $this->assertElement($element->hasAttribute($attribute), $message, $element);

        return $element;
    }
public function elementAttributeExists ( $ selectorType , $ selector , $ attribute ) { $ element = $ this -> elementExists ( $ selectorType , $ selector ) ; $ message = sprintf ( 'The attribute "%s" was not found in the %s.' , $ attribute , $ this -> getMatchingElementRepresentation ( $ selectorType , $ selector ) ) ; $ this -> assertElement ( $ element -> hasAttribute ( $ attribute ) , $ message , $ element ) ; return $ element ; }
Checks that an attribute exists in an element.

@param string       $selectorType
@param string|array $selector
@param string       $attribute

@return NodeElement

@throws ElementHtmlException
Checks that an attribute exists in an element .