使用 Sikuli 实现系统级自动化测试(10)

发表于:2017-04-11来源:weixin作者: 冯宇翔点击数: 标签:Sikuli
self.s.listen(5) except: print start CmdReceiver bind or listen failed self.inputs = [self.s] def sendresp(self , info , sock): data = info[:1024] leftstr = info[1024:] while data != : sock.send(data)

self.s.listen(5)

except:

print "start CmdReceiver bind or listen failed"

self.inputs = [self.s]

def sendresp(self , info , sock):

data = info[:1024]

leftstr = info[1024:]

while data != '':

sock.send(data)

data = leftstr[:1024]

leftstr = leftstr[1024:]

sock.close()

self.inputs.remove(sock)

def start(self):

ifrun = True

callresult = ""

while ifrun:

原文转自:https://mp.weixin.qq.com/s/XMsmK6kaysG7Y_DUZjnx-Q