""" GUI Automated Testing This module contains interface to the Button component. """ __author__ = "Lukas Cenovsky (lukas.cenovsky@bakalari.cz)" __version__ = "0.2" __date__ = "August 2008" __copyright__ = "Copyright (c) 2008 Lukas Cenovsky" from time import sleep from Win32API import Win32API from BaseComponent import BaseComponent class Button(BaseComponent): """interface to the Button component""" # the following methods are considered private # the following methods are considered public def Click(self): """ perform left mouse click on the center of the button, no parameters""" self.guiat.Activate() self._CheckVisibility() pos = self.location Win32API.MouseClick(pos[0] + (pos[2]/2), pos[1] + (pos[3]/2)) sleep(0.1) # properties