我正在用法语测试一个应用程序,我使用Seetest从屏幕上获取文本并将其存储在Python变量中。我使用的方法是GetAllValues,然后将其与存储在使用lxml解析器解析的xml中的预期文本进行比较。在
我基本上是用集合运算比较文本并找出差异。它在英语/德语中也很好,但法语有问题。在
我试着把每个字符串都转换成unicode并进行比较,结果还是不起作用。有什么建议吗?在
def converting_to_unicode(list_of_strs,unicode_string=[]):
unicode_string=[]
for string in list_of_strs:
#print string
if isinstance(string,unicode):
unicode_string.append(unicode(string.encode('latin1'),encoding='latin1'))
else:
unicode_string.append(unicode(string,encoding='latin1'))
return unicode_string
从屏幕和xml中读取文本
^{pr2}$TIA公司
目前没有回答
相关问题 更多 >
编程相关推荐