Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to see sikuli logs during execution?

I'm trying to output some debug info in a Sikuli script using print but I can see this info only after the script has finished execution because the IDE hides itself while the script is running. Is there a way to see those logs during execution? Like outputting this info to console or (better) not hiding IDE during execution?

like image 234
Poma Avatar asked Nov 02 '22 04:11

Poma


1 Answers

(1) You could use a pop-up:

popup("Hello World")

(2) You can use Jython's File IO

f = open("myLogfile.txt", 'a')
f.write("Log Message")
f.close()

Now if you open the log file in a text editor that warns about changes made to the file (ie NOT Notepad.exe), you can then see your print statements every time the file is appended by your script.

like image 80
spearson Avatar answered Nov 09 '22 11:11

spearson