python3+robot 之For循环

For循环

函数结构范例:

:For 变量  IN  序列(or 列表)

     关键字 参数值

例子1:

${name}    evaluate    ['zyy1','zyy2','zyy3']
log type(${deleteReq.content})
:for ${i} in ${name}
\ should be byte string ${deleteReq.content} ${i}

:For 变量  IN RANGE 循环限量

     关键字  参数值

例子2;

:FOR    ${i}    IN RANGE    5
\ ${neClasses} set variable testzyy${i}
\ ${param} Create Dictionary id= loginName=zyytest${i}

例子3:
:for  ${i}  in   range(2,711)
\ should be byte string ${deleteReq.content} zyy${i}

猜你喜欢

转载自www.cnblogs.com/zyy98877/p/12921254.html
今日推荐