There is no block comment feature. However, there's a subtle little trick you can use to comment out whole blocks. It's not documented to be a multiline comment feature but it can be used like that.
This trick works by knowing that robot will ignore any data in tables that are not one of the four recognized tables: keywords, tests, settings or variables. If you have some other table, anything under it up until the next table will be ignored.
The relevant section of the user guide says this:
For example:
*** Test Cases ***
| test 1
| | log | this is test one
*** comment ***
| test 2
| | log | this is test two
*** Test Cases ***
| test 3
| | log | this is test three
If you run the above test you'll see that only test 1 and test3 are executed. Everything in the "comment" table are ignored.
Hi ,Can any one help how to do multi line comment in Robot framework.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/edbf1227-9294-473c-9b76-d8ca5bcabea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Regards
Sounak
Saha |
| |||
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/CAN6_5A%3DFfVBc3b8AVDTRW4dSNx7X-ZS%2Bq2kcMY1%3DF5Demqaxkw%40mail.gmail.com.
Yeah, this trick can be used to comment out larger sections of data and also to embed data to test case files. For commenting out just few lines I'd use thr normal `#`.Notice also that since RF 3.1 only data in sections with explicit `*** Comments ***` or `*** Comment ***` header is ignored. Earlier any unrecognized header behaved like this making it hard to spot typos.Sent from my mobile.
ti 4. kesäk. 2019 klo 8.04 Sounak Saha <soun...@gmail.com> kirjoitti:
There is no block comment feature. However, there's a subtle little trick you can use to comment out whole blocks. It's not documented to be a multiline comment feature but it can be used like that.
This trick works by knowing that robot will ignore any data in tables that are not one of the four recognized tables: keywords, tests, settings or variables. If you have some other table, anything under it up until the next table will be ignored.
The relevant section of the user guide says this:
For example:
*** Test Cases *** | test 1 | | log | this is test one *** comment *** | test 2 | | log | this is test two *** Test Cases *** | test 3 | | log | this is test threeIf you run the above test you'll see that only test 1 and test3 are executed. Everything in the "comment" table are ignored.
On Tue, Jun 4, 2019 at 10:26 AM Mellamputi Sriram chowdary <ssramc...@gmail.com> wrote:
Hi ,--Can any one help how to do multi line comment in Robot framework.
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at https://groups.google.com/group/robotframework-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/robotframework-users/edbf1227-9294-473c-9b76-d8ca5bcabea3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
----
RegardsSounak Saha
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.