相关疑难解决方法(0)

RobotFramework 中的嵌套循环

我需要在 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'
Run Code Online (Sandbox Code Playgroud)

我需要有一个嵌套循环,将文件中的所有${text}与所有的进行比较@{lines}

提前致谢

java selenium for-loop nested robotframework

2
推荐指数
1
解决办法
1万
查看次数

标签 统计

for-loop ×1

java ×1

nested ×1

robotframework ×1

selenium ×1