Why is the below code not working
为什么下面的代码不起作用
@{expectedList} = Create List iphone X Samsung Note 8 Nokia Edge
${elements} = Get WebElements css:.card-title
Log To Console ${elements}
@{actualList} = Create List 1 2 3
FOR ${element} IN @{elements}
Append To List ${actualList} ${element.text}
Log To Console ${element.text}
END
${elements} list is empty
I was expecting 4 elements text.
I see the .card-title css in the site
${Elements}列表为空,我需要4个元素文本。我在站点中看到.Card-TITLE css
Below is the screenshot
and this is the url of site
https://rahulshettyacademy.com/angularpractice/shop
下面是屏幕截图,这是站点https://rahulshettyacademy.com/angularpractice/shop的URL
enter image description here
在此处输入图像描述
更多回答
I am trying to append a list by getting elements from the site
我正试图通过从该网站获取元素来添加列表
优秀答案推荐
我是一名优秀的程序员,十分优秀!