Selenium IDE循环/判断/JS插件:Flow control

Selenium IDE循环/判断/JS插件:Flow control

安装Flow control插件后,Selenium IDE可以支持循环、判断及js语句,可以很方便的重复执行刷帖,只是不能实现太复杂的逻辑。Firefox中搜索安装Flow control插件实现循环执行

selenium IDE

selenium IDE中使用js生成随机数:

|store | javascript{parseInt(Math.random()*(36100-15100)+15100)} | x |
|echo | ${x} | |      //输出echo: 34381
|pause | ${x} | |



Flow control支持的命令

label – target label.
gotolabel – unconditional jump.
gotoIf – conditional jump.

while/endWhile – cycle.

addCollection – instantiate a collection.
addToCollection – adds a value to the indicated collection (JSON objects are ok).
storeFor – retrieves the next available value from your collection and stuffs it into the indicated temporary variable. If there’s no value available it jumps to the endFor.
endFor – marks the end of the execution block.