Need to log the Sikuli IDE executed message to external file

Asked by Srinivas P

Hi ,

I am using Sikuli IDE to automate Swing based application
I wanted to write some messages to external file in my script or wanted to write Sikuli IDE messages shown during runnnning the script to external file.

Please suggest me if any such option i can import to Sikuli IDE.

Any help on this is appreciated,

Thanks & Regards,
Srinivas.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
RaiMan (raimund-hocke) said :
#1

look here:
https://github.com/RaiMan/SikuliX-2014/wiki/New-features-in-the-IDE

with 1.1.0 there is also a callback feature available, that allows to redirect all log messages to a private callback function, that then is responsible to do the right thing with the message.

Revision history for this message
Srinivas P (sri-perla) said :
#2

Thanks a lot for the reply. Let me check and revert you if any queries/clarifications.

Revision history for this message
Srinivas P (sri-perla) said :
#3

I tried using the information from your link in my script , error is shown

Sikuli IDE Script has below contects

from sikuli import *
Settings.OcrTextSearch=True
Settings.OcrTextRead=True
Settings.UserLogs = True
Settings.UserLogPrefix = "user"
Settings.UserLogTime = True
Debug.setUserLogfile("C:\sikulilog.txt")
Debug.user("Log Message",args)

Error after running above script

[error] script [ sikuliLogMessages ] stopped with error in line 8
[error] AttributeError ( type object 'org.sikuli.basics.Debug' has no attribute 'setUserLogfile' )

I am using Sikuli IDE 1.0.1.

Does setUserLogFile is supported in Sikuli IDE1.0.1

Revision history for this message
Srinivas P (sri-perla) said :
#4

Also can you please suggest me any framework for GUI automation as i am new to the open source tools evaluation and automation.

Revision history for this message
Best RaiMan (raimund-hocke) said :
#5

@comment #3
sorry for the typo:
Debug.setUserLogFile("C:\sikulilog.txt")

Revision history for this message
RaiMan (raimund-hocke) said :
#6

@comment #4

What do you mean by "framework for GUI automation"?

There are only tools/toolsets and/or libraries, targeting different areas of GUI automation:
- SikuliX: visual approach on desktop machines
- autoit: automation on Windows
- Appium: for automation/testing on mobile devices

… google (or better https://duckduckgo.com) should reveal more information.

Revision history for this message
Srinivas P (sri-perla) said :
#7

Thanks for the reply..
I mean ..looking for a framework on SikuliX.

Currently i am using IDE to write scripts it is plain click events and displaying messages.

But i wanted to implement framework such a way that , all snapshots and Variable values are declared in one class and functions are written in one class and then wanted to write test functions by calling existing classes by passing parameters

Also i need to implement test report at the end of test suite.

Is there any way like i can integrate SikuliX+Java+TestNG...etc [OR ]. SikuliX +RobotFramework + TestNG [OR] any other recommendation are welcome.

I wanted to come-up with a framework for GUI swing application using SikuliX

Hope the above information is clear please let me know if it is not clear to explain further in details.

Revision history for this message
Srinivas P (sri-perla) said :
#8

Thanks RaiMan, that solved my question.