protected function getVisibleText()
    {
        if ($this->getBaseElement() instanceof RemoteWebElement) {
            return $this->getBaseElement()->getText();
        }
        $els = $this->getBaseElement()->findElements(WebDriverBy::cssSelector('body'));
        if (isset($els[0])) {
            return $els[0]->getText();
        }
        return '';
    }
protected function getVisibleText()
    {
        if ($this->getBaseElement() instanceof RemoteWebElement) {
            return $this->getBaseElement()->getText();
        }
        $els = $this->getBaseElement()->findElements(WebDriverBy::cssSelector('body'));
        if (isset($els[0])) {
            return $els[0]->getText();
        }
        return '';
    }
protected function getVisibleText ( ) { if ( $ this -> getBaseElement ( ) instanceof RemoteWebElement ) { return $ this -> getBaseElement ( ) -> getText ( ) ; } $ els = $ this -> getBaseElement ( ) -> findElements ( WebDriverBy :: cssSelector ( 'body' ) ) ; if ( isset ( $ els [ 0 ] ) ) { return $ els [ 0 ] -> getText ( ) ; } return '' ; }
Grabs all visible text from the current page.

@return string
Grabs all visible text from the current page .