protected function ensure_node_attribute_is_set($node, $attribute, $attributevalue) {

        if (!$this->running_javascript()) {
            return;
        }

        // Exception if it timesout and the element is still there.
        $msg = 'The "' . $node->getXPath() . '" xpath node is not visible and it should be visible';
        $exception = new ExpectationException($msg, $this->getSession());

        // It will stop spinning once the $args[1]) == $args[2], and method returns true.
        $this->spin(
            function($context, $args) {
                if ($args[0]->getAttribute($args[1]) == $args[2]) {
                    return true;
                }
                return false;
            },
            array($node, $attribute, $attributevalue),
            self::get_extended_timeout(),
            $exception,
            true
        );
    }
protected function ensure_node_attribute_is_set($node, $attribute, $attributevalue) {

        if (!$this->running_javascript()) {
            return;
        }

        // Exception if it timesout and the element is still there.
        $msg = 'The "' . $node->getXPath() . '" xpath node is not visible and it should be visible';
        $exception = new ExpectationException($msg, $this->getSession());

        // It will stop spinning once the $args[1]) == $args[2], and method returns true.
        $this->spin(
            function($context, $args) {
                if ($args[0]->getAttribute($args[1]) == $args[2]) {
                    return true;
                }
                return false;
            },
            array($node, $attribute, $attributevalue),
            self::get_extended_timeout(),
            $exception,
            true
        );
    }
protected function ensure_node_attribute_is_set ( $ node , $ attribute , $ attributevalue ) { if ( ! $ this -> running_javascript ( ) ) { return ; } // Exception if it timesout and the element is still there. $ msg = 'The "' . $ node -> getXPath ( ) . '" xpath node is not visible and it should be visible' ; $ exception = new ExpectationException ( $ msg , $ this -> getSession ( ) ) ; // It will stop spinning once the $args[1]) == $args[2], and method returns true. $ this -> spin ( function ( $ context , $ args ) { if ( $ args [ 0 ] -> getAttribute ( $ args [ 1 ] ) == $ args [ 2 ] ) { return true ; } return false ; } , array ( $ node , $ attribute , $ attributevalue ) , self :: get_extended_timeout ( ) , $ exception , true ) ; }
Ensures that the provided node has a attribute value set. This step can be used to check if specific
JS has finished modifying the node.

@throws ExpectationException
@param NodeElement $node
@param string $attribute attribute name
@param string $attributevalue attribute value to check.
@return void Throws an exception if it times out without the element being visible
Ensures that the provided node has a attribute value set . This step can be used to check if specific JS has finished modifying the node .