def connect(self, **kwargs):
        """
        Connect to window and set it foreground

        Args:
            **kwargs: optional arguments

        Returns:
            None

        """
        self.app = self._app.connect(**kwargs)
        try:
            self._top_window = self.app.top_window().wrapper_object()
            if kwargs.get("foreground", True) in (True, "True", "true"):
                self.set_foreground()
        except RuntimeError:
            self._top_window = None

        Connect to window and set it foreground

        Args:
            **kwargs: optional arguments

        Returns:
            None

        
playground/win_ide.py