public function getTopLevelWindow()
    {
        foreach ($this->objects as $object) {
            if ($object instanceof Frame
            or $object instanceof Dialog) {
                return $object;
            }
        }
    }
public function getTopLevelWindow()
    {
        foreach ($this->objects as $object) {
            if ($object instanceof Frame
            or $object instanceof Dialog) {
                return $object;
            }
        }
    }
public function getTopLevelWindow ( ) { foreach ( $ this -> objects as $ object ) { if ( $ object instanceof Frame or $ object instanceof Dialog ) { return $ object ; } } }
Get the top-level window element

@return ElementInterface
Get the top - level window element