当我使用机器人框架运行代码时,selenium webdriver会给出一个
StaleElementReferenceException:消息:陈旧元素引用: 元素未附加到页面文档错误
我在for循环中遇到错误 我在出现此错误之前添加了一些延迟
@{PopupDescriptionList}= Create List aaa.bbb,ccc,ddd
${L1} create list @{PopupDescriptionList}
@{DiscriptionElem} = Get WebElements ${Select_PopUp_Description}
${List1}= Create List
sleep 2s
:For ${Discelements} IN @{DiscriptionElem}
\ log to console hello
\ sleep 5s
\ ${text1} = get text ${Discelements}
\ ${NewList}= create list ${text1}
\ ${List1}= Combine Lists ${List1} ${NewList}
log to console ${List1}
should be equal ${L1} ${List1}