How to know a string is keyword or not

for example this line:
Read Until ${my_serial} I3C_0 Slave Dynamic Address Assigned: 1

I guess most programmers will hate the style. Is " I3C_0 Slave Dynamic Address Assigned:" a comment string, or it transfers to a function call? if it transfers to a function call, what is the function name, prototype, argument? how to trace into for debug?

thanks I am new to this tool.

Hi Joe,

You probably want to start here Rules for parsing the data

Spaces are very important in Robot Framework, and from your example line it’s hard to tell, It’s best to use a code block (``` on the line before and after) when posting examples to preserve the spacing.

If the example line was like this:

Read Until    ${my_serial} I3C_0 Slave Dynamic Address Assigned: 1

Then the string ${my_serial} I3C_0 Slave Dynamic Address Assigned: 1 would have the variable ${my_serial} evaluated to it’s value and then the resulting string would be passed as an argument to the Read Until keyword

If the example however was like this:

Read Until    ${my_serial}     I3C_0 Slave Dynamic Address Assigned: 1

Then Read Until keyword would receive 2 arguments

And if the example was like this:

Read Until ${my_serial}     I3C_0 Slave Dynamic Address Assigned: 1

Then Read Until ${my_serial} is the keyword.

After that you probably also want to read Creating test library class or module as it will answer most of your questions.

Hope that helps,

Dave.

Dave thanks! I will read the link. Spaces are eaten by the web, so I use - to replace it, the line is:
Read Until----${mcp_serial}----I3C_0 Slave Dynamic Address Assigned:---2

1 Like