【发布时间】:2017-09-18 13:12:03
【问题描述】:
我需要在 Robot 框架中创建一个嵌套循环。 你能帮我做吗?
${contents}= Get File ${file path}
@{lines}= Split to lines ${contents}
${matched elements}= Get Webelements ${LABEL PORTAIL XPATH }
: FOR ${element} IN @{matched elements}
\ ${text}= Get Text ${element}
\ : FOR ${line} IN @{lines}
\ Run Keyword If '${text}' == '${line}' Log '${text} matched'
我需要一个嵌套循环,将文件中的所有${text} 与所有@{lines} 进行比较。
提前致谢
【问题讨论】:
标签: java selenium for-loop nested robotframework