How to use Call Method for printing some info to console
1,233 views
Skip to first unread message
jun mi
unread,
May 24, 2012, 10:15:29 PM5/24/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to robotframe...@googlegroups.com
I just want print some debug info to console, so I want to use Call Method .
${path}= Get Environment Variable PATH
Call Method print ${path}
and run failed ,failed log is Object 'print' does not have a method
thank you for telling me how to use it.
Jussi Malinen
unread,
May 25, 2012, 5:48:18 AM5/25/12
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to mij...@gmail.com, robotframe...@googlegroups.com
Hi!
Normally the way to do logging in robot is to use the "log"-keyword.
This does not write the output to console, but instead to the
generated log file.
As a side note, if you log using the warn-level, the warning will also
be written to console, but that might not be the best idea in this
case.
In the user guide the chapter "logging to console" [1] shows how to
create your own library that writes messages to console during the run
time. Just create the library with the content in the example listing
and then you can use the keyword "log to console".
I would still suggest that you use the keyword log and check the value
from the log file after the execution. That is a more maintainable
solution in the long term.