← Back to team overview

sikuli-driver team mailing list archive

[Question #237075]: How to get log for sikuli?

 

New question #237075 on Sikuli:
https://answers.launchpad.net/sikuli/+question/237075

How to get log file for my Automation test cases?

In run time I am able to see the log information of below test case but i want to get one log file for it (ie .txt file or .log file)

Want to get one text file for it. Please help me how to get it?

Test 1 - compare.sikuli

code :

from sikuli import *
def getBTSserialNumber(file):
    f = open(file)
    BTSSerialNumber = ""
    for line in f.readlines():
        if line.count("BTS SerialNumber") == 0: continue
        (head, BTSSerialNumber) = line.split(":")
        BTSSerialNumber = BTSSerialNumber.strip()
        break
    f.close()
    return BTSSerialNumber

file1="C:\\BTS1.txt"
file2="C:\\BTS2.txt"

BTSSerialNumber1 = getBTSserialNumber(file1)
BTSSerialNumber2 = getBTSserialNumber(file2)

if BTSSerialNumber1 == BTSSerialNumber2:
    print "Both the BTS serial Number's are Same:", BTSSerialNumber1, "in:", file1, "and:", file2
    
else:
    print "BTS Serial Number's are different:", BTSSerialNumber1,"and", BTSSerialNumber2, "in:", file1, "and:", file2





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