简体   繁体   English

从机器人框架中具有竖线的表中获取所有行

[英]Get all rows from a table that has vertical bar in robot framework

I have a table which just shows 25 rows on inspection.我有一张表,在检查时只显示 25 行。 It loads new set of rows on scrolling.它在滚动时加载新的行集。 But at a time there are only 25 rows that are visible.但一次只有 25 行可见。 The ELEMENT also changes its ID from 1 to 25 to let's say 8 to 32 after little scroll. ELEMENT 在小滚动后还将其 ID 从 1 更改为 25,假设为 8 到 32。 Point is it doesn't show entire content at any given time and only loads 25 IDs at any point.关键是它不会在任何给定时间显示全部内容,并且在任何时候只加载 25 个 ID。 My requirement is to fetch all the rows(98) from the table.我的要求是从表中获取所有行(98)。 I have tried using Scroll Element Into View , but that has not helped me.我曾尝试使用Scroll Element Into View ,但这对我没有帮助。 Also using Execute JavaScript window.scrollTo(0, document.body.scrollHeight) has not helped as well.同样使用Execute JavaScript window.scrollTo(0, document.body.scrollHeight)也没有帮助。

I have seen so many questions on this one, but no appropriate solution to this.我在这个问题上看到了很多问题,但没有合适的解决方案。

How to do scrolling inside infinite load table or list如何在无限负载表或列表中滚动

Robot framework, Python - handle lazy load on page with dynamic content机器人框架,Python - 处理具有动态内容的页面上的延迟加载

Please help if possible.如果可能,请提供帮助。

You have to write recursive keyword that would do following things:您必须编写递归关键字来执行以下操作:

  1. Collects required data收集所需数据
  2. Triggers loading of new rows (scrolls to the bottom, clicks button)触发加载新行(滚动到底部,单击按钮)
  3. If there are new rows trigger this keyword once more如果有新行再次触发此关键字
  4. Combine results合并结果

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM