Unable to scroll to bottom of the grid #23861
Pradhakrishna284
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Grid Name:- wj-flex-grid.bento-flex-grid
Grid Row:- div[role='row']
Grid Cell:- div[role='gridcell']
At a time, in the grid, only 12 rows are visible (1 header row, 1 empty row to enter data, and then the remaining 10 rows are data if there are any records),
my grid has more than 10 data rows, my expected text("Test_TT_16") is at 18th data row, though I used
scrollIntoView() method, I am unable to move to the grid to bottom to find my text. Any help to modify the code.
Approach1:-
Issue1:- cy.scrollTo() can only be used to scroll 1 element, you tried to scroll 12 elements.
I get this issue, when I use the below code.
cy.get('wj-flex-grid.bento-flex-grid div[wj-part="root"]').scrollIntoView().within(() => {
Approach2:-
Issue2:- When I use the below code, only the first 10 visible data rows are printed, but my data is not printed, but the grid is scrolled to bottom
after printing the first 10 rows data
cy.get('wj-flex-grid.bento-flex-grid div[wj-part="root"] div[role='row']', { timeout: 30000 }).each((row, index) => {
cy.wrap(row).scrollIntoView().within(() => { //within the selected row
Beta Was this translation helpful? Give feedback.
All reactions