如何使用机器人框架在表中验证特定行?

发布于 2025-02-09 16:38:09 字数 217 浏览 2 评论 0原文

在这里,我添加一台设备,需要验证该设备。 如何使用机器人框架在表中验证特定的第二行

谢谢!

Here, I add one device and need to validate that one.
How to validate particular 2nd row in a table using ROBOT framework
enter image description here

Thank you!!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温折酒 2025-02-16 16:38:09

如果您使用的是SeleniumLibrary来测试您的WebApp:

1。第一个解决方案:
使用“ Table Cell应该包含”关键字
[文档

]第二个解决方案:

- 您需要获取第二行的所有元素,类似:

${data}   Get WebElements   id=//"id for all elements in second row"

- 然后您可以运行一个循环以检查每个元素:

FOR   ${element}   in   @{data}
   ${data}   Get Text   ${element}
   your test..
END

If you are using SeleniumLibrary to test your WebApp:

1. First solution:
Use "Table Cell Should Contain" keyword
[Documentation]

2. Second solution:

-You need is to get all the elements of second row, something like:

${data}   Get WebElements   id=//"id for all elements in second row"

-Then with that you can run a for cycle to check each element:

FOR   ${element}   in   @{data}
   ${data}   Get Text   ${element}
   your test..
END
追我者格杀勿论 2025-02-16 16:38:09

建议您尝试另一个自动化库clicknium,如硒一样,但要编写XPath或CSS选择器,您可以在录制的定位器中定义Tablerow或TableColumn

suggest you try another automation library clicknium, similiar as selenium, but instead writing xpath or css-selector,you can define the tablerow or tablecolumn in recorded locator

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文