예제 #1
0
 def receive_text():
     """Receive data from text field"""
     time.sleep(0.2)
     SendKeys('^a')
     time.sleep(0.2)
     SendKeys('^c')
     SendKeys('{RIGHT}')
     received = clipboard.get_data()
     return received
예제 #2
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
예제 #3
0
 def test_set_data(self):
     """Make sure that set text to clipboard works"""
     clipboard.set_data('abc1')
     received = clipboard.get_data()
     self.assertEquals('abc1', received)