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

发表于:2017-04-11来源:weixin作者: 冯宇翔点击数: 标签:Sikuli
getdata = getdata.decode(UTF-8) print getdata is + getdata reqarr = getdata.split(|) try: resarr = getattr(self.procclass , reqarr[0])(reqarr[1]) except Exception,e: sendstr = 1|run has errors: + str(

getdata = getdata.decode('UTF-8')

print 'getdata is ' + getdata

reqarr = getdata.split('|')

try:

resarr = getattr(self.procclass , reqarr[0])(reqarr[1])

except Exception,e:

sendstr = '1|run has errors:' + str(e)

else:

if resarr[0] == True:

sendstr = '0|' + resarr[1]

else:

sendstr = '1|' + resarr[1]

finally:

if len(sendstr) < 200:

print 'sendstr is ' + sendstr

self.sendresp(sendstr , sock)

except Exception , e:

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