public function getRegion($region)
    {
        $session = $this->getSession();
        $regionObj = $session->getPage()->find('region', $region);
        if (!$regionObj) {
            throw new \Exception(sprintf('No region "%s" found on the page %s.', $region, $session->getCurrentUrl()));
        }

        return $regionObj;
    }
public function getRegion($region)
    {
        $session = $this->getSession();
        $regionObj = $session->getPage()->find('region', $region);
        if (!$regionObj) {
            throw new \Exception(sprintf('No region "%s" found on the page %s.', $region, $session->getCurrentUrl()));
        }

        return $regionObj;
    }
public function getRegion ( $ region ) { $ session = $ this -> getSession ( ) ; $ regionObj = $ session -> getPage ( ) -> find ( 'region' , $ region ) ; if ( ! $ regionObj ) { throw new \ Exception ( sprintf ( 'No region "%s" found on the page %s.' , $ region , $ session -> getCurrentUrl ( ) ) ) ; } return $ regionObj ; }
Return a region from the current page.

@throws \Exception
If region cannot be found.

@param string $region
The machine name of the region to return.

@return \Behat\Mink\Element\NodeElement
Return a region from the current page .