← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #270546]: Comparing texts between 2 versions of my application

 

Question #270546 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/270546

Eugene Maslov proposed the following answer:
Well, compare the tables with Python cell by cell.

content1 = open('d:/file1.txt', 'r').readlines() 
content2 = open('d:/file2.txt', 'r').readlines() 

different=0
for ln in range(len(content1)):
    cells1=content1[ln].split()
    cells2=content2[ln].split() 
    for cell in range(len(cells1)):            
        if cells1[cell]<>cells2[cell]:     
            different+=1
            print "cell "+str(ln)+":"+str(ln)+ " is different"

There is no need to use Sikuli functions for that. Sikuli just
conveniently extends the power of Python (or another applicable
language), making it able to see the screen and to act like a real user.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.