我正在尝试使用机器人框架检查for循环中的多个条件,但它永远不会返回true。
:FOR ${RowIndex} IN RANGE 0 ${rowscount}
${ColumnText1} Get Text //*[@id='RadSearchGrid_ctl00__${RowIndex}']/td[3]
${ColumnText2} Get Text //*[@id='RadSearchGrid_ctl00__${RowIndex}']/td[4]
${ColumnText3} Get Text //*[@id='RadSearchGrid_ctl00__${RowIndex}']/td[5]
${bStatus} | Run Keywords | Should Contain | ${ColumnText1} and ${ColumnText2} and ${ColumnText3} | ${VoucherNumber} and ${Voucherdate} and ${VoucherAmount}
Exit For Loop If ${bStatus}
$ {bStatus}永远不会返回true。
答案 0 :(得分:4)
尝试这样的事情
:FOR ${RowIndex} IN RANGE 0 ${rowscount}
${ColumnText1} Get Text //*[@id='RadSearchGrid_ctl00__${RowIndex}']/td[3]
${ColumnText2} Get Text //*[@id='RadSearchGrid_ctl00__${RowIndex}']/td[4]
${ColumnText3} Get Text //*[@id='RadSearchGrid_ctl00__${RowIndex}']/td[5]
${bStatus}= Run Keyword And Return Status Run Keywords Should Contain ${ColumnText1} ${VoucherNumber} AND Should Contain ${ColumnText2} ${Voucherdate} AND Should Contain ${ColumnText3} ${VoucherAmount}
Exit For Loop If ${bStatus}