javascript - Is there a way to disable Angular Grid virtualization, i.e. Angular creating div's for grid based on height

I have a Angular grid (ag-grid) that will, based on scrollingview, create div in the DOM to display da

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 badges
Add a ment  | 

3 Answers 3

Reset to default 4

there 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'

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745668131a4639240.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信