select msgbox by title and check
[Arguments] ${title} ${msg}
@{wins} Get Window Handles
:FOR ${win} IN @{wins}
\ Select Window ${win}
\ ${current_win_title} Get Title
\ run keyword if "${current_win_title}" == "${title}" run keywords Element Text Should Be contentTD ${msg}
\ ... AND Exit For Loop
您好,我正在使用SeleniumLibrary和robotframework来测试一个网站,我需要切换到窗口标题的特定窗口,并检查窗口中的元素文本。
我的问题是,在某些情况下,所有的窗口都不匹配for循环中的if条件,并且循环耗尽了,有没有办法检查这种情况并再次运行for循环,或者在这种情况下,机器人框架for loop在for循环中具有else部分?
https://stackoverflow.com/questions/50603611
复制相似问题