How to use pound sign as input instead of argument?

391 views
Skip to first unread message

David

unread,
Mar 12, 2011, 3:17:36 AM3/12/11
to robotframework-users
I'll need to follow up later when I'm onsite with my computer, testing
it remotely has some delays so can't tell for sure, but doesn't look
like it's working so far.

Trying to automate SIP softphone with AutoItLibrary and RF. Want to
pass a # character as a test case argument, so that softphone can dial
# on keypad.

Problem is # character is used as code comment in Python and RF passes
that along from test cases to Python code.

How to properly escape the # to use it as test data? With backslash
like '\#'? Or single quote the # like '#'? Or try it as Python raw
strings format r'#'? Or set it as a Python variable instead of value
or variable in test case file, etc.?

David

unread,
Mar 12, 2011, 3:19:12 AM3/12/11
to robotframework-users
Oops made typo in thread title. Meant to say "comment" instead of
"argument".

Juha Rantanen

unread,
Mar 14, 2011, 1:46:53 AM3/14/11
to mang...@gmail.com, robotframework-users
2011/3/12 David <mang...@gmail.com>:

> Oops made typo in thread title. Meant to say "comment" instead of
> "argument".
>
> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To post to this group, send email to robotframe...@googlegroups.com.
> To unsubscribe from this group, send email to robotframework-u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/robotframework-users?hl=en.
>
>

Hi,

Backslash is a escape character [1] so \# is the way to go.

[1] http://robotframework.googlecode.com/svn/tags/robotframework-2.5.6/doc/userguide/RobotFrameworkUserGuide.html#escaping

Br,
Juha

--
Juha Rantanen
agile tester/coach @ http://reaktor.fi

Reply all
Reply to author
Forward
0 new messages