original_string: protected function ensure_element_is_visible($element, $selectortype) {
  
          if (!$this->running_javascript()) {
              return;
          }
  
          $node = $this->get_selected_node($selectortype, $element);
          $this->ensure_node_is_visible($node);
  
          return $node;
      }
code: protected function ensure_element_is_visible($element, $selectortype) {
  
          if (!$this->running_javascript()) {
              return;
          }
  
          $node = $this->get_selected_node($selectortype, $element);
          $this->ensure_node_is_visible($node);
  
          return $node;
      }
code_tokens: protected function ensure_element_is_visible ( $ element , $ selectortype ) { if ( ! $ this -> running_javascript ( ) ) { return ; } $ node = $ this -> get_selected_node ( $ selectortype , $ element ) ; $ this -> ensure_node_is_visible ( $ node ) ; return $ node ; }
docstring: Ensures that the provided element is visible and we can interact with it.
  
  Returns the node in case other actions are interested in using it.
  
  @throws ExpectationException
  @param string $element
  @param string $selectortype
  @return NodeElement Throws an exception if it times out without being visible
docstring_tokens: Ensures that the provided element is visible and we can interact with it .