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
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
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)