original_string: protected function ensure_node_is_visible($node) {
  
          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 isVisible() method returns true.
          $this->spin(
              function($context, $args) {
                  if ($args->isVisible()) {
                      return true;
                  }
                  return false;
              },
              $node,
              self::get_extended_timeout(),
              $exception,
              true
          );
      }
code: protected function ensure_node_is_visible($node) {
  
          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 isVisible() method returns true.
          $this->spin(
              function($context, $args) {
                  if ($args->isVisible()) {
                      return true;
                  }
                  return false;
              },
              $node,
              self::get_extended_timeout(),
              $exception,
              true
          );
      }
code_tokens: protected function ensure_node_is_visible ( $ node ) { 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 isVisible() method returns true. $ this -> spin ( function ( $ context , $ args ) { if ( $ args -> isVisible ( ) ) { return true ; } return false ; } , $ node , self :: get_extended_timeout ( ) , $ exception , true ) ; }
docstring: Ensures that the provided node is visible and we can interact with it.
  
  @throws ExpectationException
  @param NodeElement $node
  @return void Throws an exception if it times out without the element being visible
docstring_tokens: Ensures that the provided node is visible and we can interact with it .