How can I prevent the logging of all keywords exce

2019-07-18 12:10发布

I am a beginner in robot framework. I want the log file of my robot test to contain the logs for only the log keyword. I tried to use removekeyword all. But It removed all keywords. enter image description here

When I dont use the removekeyword, My log becomes messy enter image description here

How can I log only the keyword-Log to my file? Also, How can I log the value of ${resp.status_code} in the log, instead of it being showed as a text in the above screenshot? Log to console is printing the value in console, but when I use Log, I am seeing it as the variable itself.

Edit: What I want is

Keyword When I post a post Request
           -keyword Log value of{resp_status code}
           -keyword Log ****************************
Keyword THEN verify status code is 200
           -keyword Log status code is 200

I don't want any other logs to show up other than the log keyword

0条回答
登录 后发表回答