protected function getHeaderElement()
    {
        /*
         * h2s were used prior to WP v4.3/4 and h1s after.
         * See https://make.wordpress.org/core/2015/10/28/headings-hierarchy-changes-in-the-admin-screens/
         */
        $header2 = $this->find('css', '.wrap > h2');
        $header1 = $this->find('css', '.wrap > h1');

        if ($header1) {
            return $header1;
        } elseif ($header2) {
            return $header2;
        }

        throw new ExpectationException('[W402] Header could not be found', $this->getDriver());
    }
protected function getHeaderElement()
    {
        /*
         * h2s were used prior to WP v4.3/4 and h1s after.
         * See https://make.wordpress.org/core/2015/10/28/headings-hierarchy-changes-in-the-admin-screens/
         */
        $header2 = $this->find('css', '.wrap > h2');
        $header1 = $this->find('css', '.wrap > h1');

        if ($header1) {
            return $header1;
        } elseif ($header2) {
            return $header2;
        }

        throw new ExpectationException('[W402] Header could not be found', $this->getDriver());
    }
protected function getHeaderElement ( ) { /*
         * h2s were used prior to WP v4.3/4 and h1s after.
         * See https://make.wordpress.org/core/2015/10/28/headings-hierarchy-changes-in-the-admin-screens/
         */ $ header2 = $ this -> find ( 'css' , '.wrap > h2' ) ; $ header1 = $ this -> find ( 'css' , '.wrap > h1' ) ; if ( $ header1 ) { return $ header1 ; } elseif ( $ header2 ) { return $ header2 ; } throw new ExpectationException ( '[W402] Header could not be found' , $ this -> getDriver ( ) ) ; }
Get the text in the header tag.

The first h1 element is used, or first h2 element if it is not present.

@throws \Behat\Mink\Exception\ExpectationException
Get the text in the header tag .