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;
    }
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;
    }
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 ; }
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
Ensures that the provided element is visible and we can interact with it .