def setUp(self): """Start the sample application. Open a tab with ownerdraw button.""" Timings.defaults() self.app = Application().start(os.path.join(mfc_samples_folder, u"RebarTest.exe")) # open the Help dailog self.app.active().type_keys('%h{ENTER}')
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() app = Application() path = os.path.split(__file__)[0] test_file = os.path.join(path, "test.txt") with codecs.open(test_file, mode="rb", encoding='utf-8') as f: self.test_data = f.read() # remove the BOM if it exists self.test_data = self.test_data.replace(repr("\xef\xbb\xbf"), "") #self.test_data = self.test_data.encode('utf-8', 'ignore') # XXX: decode raises UnicodeEncodeError even if 'ignore' is used! print('self.test_data:') print(self.test_data.encode('utf-8', 'ignore')) app.start("Notepad.exe " + test_file, timeout=20) self.app = app self.dlg = app.UntitledNotepad self.ctrl = self.dlg.Edit.wrapper_object() self.old_pos = self.dlg.rectangle self.dlg.move_window(10, 10, 400, 400)
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() app = Application() path = os.path.split(__file__)[0] test_file = os.path.join(path, "test.txt") with codecs.open(test_file, mode="rb", encoding='utf-8') as f: self.test_data = f.read() # remove the BOM if it exists self.test_data = self.test_data.replace(repr("\xef\xbb\xbf"), "") #self.test_data = self.test_data.encode('utf-8', 'ignore') # XXX: decode raises UnicodeEncodeError even if 'ignore' is used! print('self.test_data:') print(self.test_data.encode('utf-8', 'ignore')) app.start("Notepad.exe " + test_file, timeout=20) self.app = app self.dlg = app.UntitledNotepad self.ctrl = self.dlg.Edit.WrapperObject() self.old_pos = self.dlg.rectangle self.dlg.MoveWindow(10, 10, 400, 400)
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() self.app = Application().start(os.path.join(mfc_samples_folder, u"RowList.exe")) self.dlg = self.app.RowListSampleApplication self.ctrl = self.app.RowListSampleApplication.ListView.wrapper_object()
def setUp(self): """Start the sample application. Open a tab with ownerdraw button.""" Timings.defaults() self.app = Application().Start( os.path.join(mfc_samples_folder, u"RebarTest.exe")) # open the Help dailog self.app.active_().type_keys('%h{ENTER}')
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() self.app = Application().start(os.path.join(mfc_samples_folder, u"BCDialogMenu.exe")) self.dlg = self.app.BCDialogMenu self.app.wait_cpu_usage_lower(threshold=1.5, timeout=30, usage_interval=1) self.dlg.wait('ready')
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() self.app = Application() self.app.start("Notepad.exe") self.dlg = self.app.Notepad
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() self.app = Application() self.app.start(os.path.join(mfc_samples_folder, u"CmnCtrl1.exe")) self.dlg = self.app.Common_Controls_Sample self.ctrl = self.dlg.TreeView.wrapper_object()
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() # start the application self.app = Application(backend='win32') self.app = self.app.start(mfc_app_1) self.dlg = self.app.CommonControlsSample
def setUp(self): """Set some data and ensure the application is in the state we want""" if sys.platform == 'win32': Timings.defaults() self.app = Application() self.app.start(_test_app()) self.dlg = self.app.mousebuttons else: self.display = Display() self.app = subprocess.Popen("exec " + _test_app(), shell=True) time.sleep(1)
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() self.tm = _ready_timeout app = Application(backend='win32') app.start(os.path.join(mfc_samples_folder, u"TrayMenu.exe"), wait_for_idle=False) self.app = app self.dlg = app.top_window() mouse.move((-500, 200)) # remove the mouse from the screen to avoid side effects self.dlg.wait('ready', timeout=self.tm)
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() self.app = Application().start( os.path.join(mfc_samples_folder, u"BCDialogMenu.exe")) self.dlg = self.app.BCDialogMenu self.app.wait_cpu_usage_lower(threshold=1.5, timeout=30, usage_interval=1) self.dlg.wait('ready')
def setUp(self): """Set some data and ensure the application is in the state we want""" Timings.defaults() self.app = Application().start("notepad") self.dlghandle = self.app.UntitledNotepad.handle self.edit_handle = self.app.UntitledNotepad.Edit.handle
def setUp(self): Timings.defaults() self.app = Application().start( os.path.join(mfc_samples_folder, u'CtrlTest.exe')) self.dlg = self.app.Control_Test_App
def setUp(self): Timings.defaults() self.app = Application().start(os.path.join(mfc_samples_folder, u'CtrlTest.exe')) self.dlg = self.app.Control_Test_App