Logo Search packages:      
Sourcecode: mago version File versions  Download package

def mago::application::main::Application::close (   self  ) 

Given an application, it tries to close it. 

Definition at line 86 of file main.py.

00086                    :
        """
        Given an application, it tries to close it. 
        """
        try:
            app = ooldtp.context(self.name)
            try:
                close_widget = app.getchild(self.close_name)
            except ldtp.LdtpExecutionError:
                raise ldtp.LdtpExecutionError, "The " + self.close_name + " widget was not found."

            if self.close_type == 'menu':
                close_widget.selectmenuitem()
            elif self.close_type == 'button':
                close_widget.click()
            else:
                raise ldtp.LdtpExecutionError, "Wrong close item type."
            response = ldtp.waittillguinotexist(self.name, '', 20)
            if response == 0:
                raise ldtp.LdtpExecutionError, "Mmm, something went wrong when closing the application."
        except ldtp.LdtpExecutionError, msg:
            raise ldtp.LdtpExecutionError, "Mmm, something went wrong when closing the application: " + str(msg)

    def save(self, save_menu='mnuSave'):


Generated by  Doxygen 1.6.0   Back to index