[英]Robot framework identify card types using if condition
Before selecting button, need to check either input or output card.在选择按钮之前,需要检查输入卡或输出卡。 need a logic to identify either it is INPUT or OUTPUT Card using robot framework and if condition for web automation testing.需要一个逻辑来识别它是使用机器人框架的输入卡还是输出卡,以及网络自动化测试的条件。
**IO CARDS**
SLOT 1 :DI
SLOT 2 :DI
SLOT 3 :DI
SLOT 4 :DI
SLOT 5 :DO
SLOT 6 :DO
SLOT 7 :DI
Please try to solve this请尝试解决这个问题
${elementId}= | Set Variable | Slot${slotNumber}BTN
Log To Console | ${elementId}
Click Element | slot${slotNumber}BTN
Sleep | 3s
${slotLink} = | get text | id=slot${slotNumber}BTN
Log to Console | ${slotLink}
IF | '${slotLink}'== 'Slot ${slotNumber} : DI'
Validate Input Card Options ${slotNumber}
END
IF | '${slotLink}'== 'Slot ${slotNumber} : DO'
Validate Output Card Options ${slotNumber}
END
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.