Пример #1
0
 def __get_text(self):
     data = ''
     time.sleep(1)
     send_keys('^a^c', pause=0.2)
     if sys.platform == 'win32':
         win32clipboard.OpenClipboard()
         data = win32clipboard.GetClipboardData()
         win32clipboard.CloseClipboard()
     else:
         data = clipboard.get_data()
     return data
Пример #2
0
 def __get_text(self):
     data = ''
     time.sleep(1)
     send_keys('^a^c', pause=0.2)
     if sys.platform == 'win32':
         win32clipboard.OpenClipboard()
         data = win32clipboard.GetClipboardData()
         win32clipboard.CloseClipboard()
     else:
         data = clipboard.get_data()
     return data
Пример #3
0
 def receive_text(self):
     """Receive data from text field"""
     received = ' '
     if sys.platform == 'win32':
         received = self.ctrl.TextBlock()
     else:
         time.sleep(0.2)
         SendKeys('^a')
         time.sleep(0.2)
         SendKeys('^c')
         SendKeys('{RIGHT}')
         received = clipboard.get_data()
     return received