admin管理员组文章数量:1435859
I have a Angular grid (ag-grid) that will, based on scrolling/view, create div in the DOM to display data. I am writing a Selenium WebDriver test that would read the data from the grid and pare it to the data returned from the API.
Since some of the div's are not yet created (hidden behind Angular virtualization) WebDriver is not able to effectively capture the data.
Is there a way to force the grid to display all data?
I have a Angular grid (ag-grid) that will, based on scrolling/view, create div in the DOM to display data. I am writing a Selenium WebDriver test that would read the data from the grid and pare it to the data returned from the API.
Since some of the div's are not yet created (hidden behind Angular virtualization) WebDriver is not able to effectively capture the data.
Is there a way to force the grid to display all data?
Share Improve this question edited Mar 21, 2016 at 20:12 user3063502 asked Mar 21, 2016 at 18:31 user3063502user3063502 512 silver badges5 bronze badges3 Answers
Reset to default 4there is a setting, gridOptions.rowBuffer, that tells the grid how many extra rows to render above / below the viewport. set this to a number greater than the number of rows you have and then all rows will be rendered. or if unsure, set it to 9999999.
ps you mention 'Angular Grid' and 'Angular Virtualisation'. to be correct, it is called 'Agnostic Grid' - the ag stands for AGnostic - and also the virtualisation is not Angular, grid grid has it's own implementation of row virtualisation.
Try explicitly clicking the scrollbar or panning the scrolled area in order to bring the desired div(s) into view to force Angular to instantiate the divs. You could try scroll-into-view on a known instantiated object on the edge of the instantiated div set, which would, I imagine, kick Angular into instantiating the ones just outside the view, in anticipation of continued scrolling. Wash, rinse, repeat if desired.
Here's a possibly helpful page about scroll to element in Selenium: Scroll Element into View with Selenium
Try setting domLayout
to domLayout = 'autoHeight'
本文标签:
版权声明:本文标题:javascript - Is there a way to disable Angular Grid virtualization, i.e. Angular creating div's for grid based on height 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745668131a2669405.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论