How to write CTRL-C via telnet or ssh library

2,845 views
Skip to first unread message

learner

unread,
Jan 26, 2012, 4:15:28 PM1/26/12
to robotframework-users
I'm new to Robot Framework and am struggling with how to send a CTRL-C
using the telnet or ssh library.

I've tried setting a variable to various values and using the
library's write keyword to send it, but nothing seems to work.

Here are the values I've tried:
Set Test Variable ${CONTROL-C} [03
Set Test Variable ${CONTROL-C} ^03
Set Test Variable ${CONTROL-C} [03]
Set Test Variable ${CONTROL-C} \\c

For each one of them I tried
SSHLibrary.Write ${CONTROL-C}

None of them seem to work in that the process on the machine that has
been ssh'ed to doesn't stop.

Any ideas?


sbruhn

unread,
Jan 27, 2012, 3:50:07 AM1/27/12
to robotframework-users
That's how it works for me for SSH

${crtl_c} Evaluate chr(int(3))
SSHLibrary.Write Bare ${crtl_c}

learner

unread,
Jan 27, 2012, 4:02:10 PM1/27/12
to robotframe...@googlegroups.com
Thanks very much, that worked for me!!
Reply all
Reply to author
Forward
0 new messages