| 200' and ValueError: invalid literal for int() with base 10: '202 or 200'

问题描述 投票:0回答:1
can anyone guide how can i do this status code check with or in robot?

  Run keyword if  '${Method}'== 'POST'    RequestsChecker.Check Response Status   
  ${response}  202 || 200
  or
  Run keyword if  '${Method}'== 'POST'    RequestsChecker.Check Response Status   
  ${response}  202 or 200

I have robot framework code which should check the status code is 200 or 202 if method is post so I am trying this code Run keyword if '${Method}'== 'POST' RequestsChecker.Check Response Status ...

That keyword accepts a single RC - which can be int or a string, but the very first thing it does is to cast it to int. So it cannot work with "202
python robotframework
1个回答
1
投票

错误。 ValueError: invalid literal for int() with base 10: '202'。

© www.soinside.com 2019 - 2024. All rights reserved.