sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #08080
Re: [Question #184494]: Writing log messages to a log file
Question #184494 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/184494
Summary changed to:
Writing log messages to a log file
Description changed to:
**** this is a follow up of
https://answers.launchpad.net/sikuli/+question/184000
----------------------------------------------------------------------------
I want to copy all the log file into the notepad. After every line it
should give the proper message like "the corresponding image is clicked
". But for me notepad is getting opened. But nothing is copied into
that. Please help me..Below is my code.
def log(typ, msg):
if loglevel >= 0 and typ == 0:
print "[myinfo]", msg
elif loglevel >= 1 and typ == 1:
x=msg
file.write(x)
elif loglevel >= 2 and typ == 2:
print "[myerror]", msg
loglevel = 2
file =open("C:\Users\Public\Videos\Desktop\log.txt","w")
log(0, "script started")
rightClick("1326118361937.png")
click("Manage.png")
click("DeviceManage.png")
doubleClick("Computer.png")
rightClick("ACPIMultipro.png")
def driver():
click("Properties.png")
click("Driver.png")
sik = ("DriverVersio.png")
m = find(sik).left(1).right(200)
m.highlight(3)
print m.text()
click("1326120256234.png")
driver()
Thanks
Balakrishnan.A.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.