SlickGrid? (or dynamic content loading)

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
dhale
Posts: 15
Joined: Thu Feb 27, 2014 7:33 pm

SlickGrid? (or dynamic content loading)

Post by dhale » Wed Mar 11, 2015 5:12 pm

Anyone familiar with or had to deal with SlickGrid?
Or
Any general advise on how best to deal with searching through data that is dynamically loaded/unloaded as user scrolls or pages through?

I'm trying to figure out how best to deal with searching through a SlickGrid when the item of interest is not immediately available, but should be returned at some point.

For example, lets say you wanted to find & work against some row (lets say "Task 19423") part way down this list of 50,000 possible results...
http://mleibman.github.io/SlickGrid/exa ... model.html

If you spy this grid, and use a path of

Code: Select all

/dom[@domain='mleibman.github.io']//div[#'myGrid']//div[@class='grid-canvas']/div
you'll see that only about 30-50 'rows' are available at any point in time.

What kind of tricks/tips come in handy on this kind of scenario?

Using Ranorex 5.3, Windows 7, IE8/9/10/11/Chrome/Firefox

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: SlickGrid? (or dynamic content loading)

Post by krstcs » Thu Mar 12, 2015 2:17 pm

This type of thing is usually the result of what is called "lazy loading". The system only loads the relevant information for the visible rows, and only loads place-holder row information for the other rows.

About the only thing I have found that is reliable is to have Ranorex scroll the window 1 row at a time until you find the one you need. Depending on the way the element is coded there may be several ways to do it, so you will have to figure out which way is best in your case.
Shortcuts usually aren't...

dhale
Posts: 15
Joined: Thu Feb 27, 2014 7:33 pm

Re: SlickGrid? (or dynamic content loading)

Post by dhale » Thu Mar 12, 2015 4:19 pm

That's what I figured.

Its interesting that there's no way to get a hold of the vertical scrollbar within the scrollable divtag in this scenario.

I'm using PageDown to trigger the movement through the data at the moment.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: SlickGrid? (or dynamic content loading)

Post by Ciege » Fri Mar 13, 2015 4:23 pm

So this is how I solved it...

I had to find the "viewport" of the grid and then the "canvas" of the grid.

With those elements of the grid you can the get the viewPortHeight, canvasHeight and canvasY values.

If canvasHeight - canvasY - viewPortHeight == 0 then you are at the end of the grid.

After each PageDown get the new CanvasY value and repeat.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

smohanty78
Posts: 23
Joined: Tue Feb 10, 2015 10:51 am

Re: SlickGrid? (or dynamic content loading)

Post by smohanty78 » Wed Mar 22, 2017 12:14 pm

can you please help me to find out canvasHeight - canvasY - viewPortHeight == 0 in order to implement the slick grid scroll bar logic?

I could see viewport and canvas .but not able to figure our canvasY

krstcs
Ranorex Guru
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: SlickGrid? (or dynamic content loading)

Post by krstcs » Wed Mar 22, 2017 3:33 pm

First, this post is 2 years old. Please do not re-open ("necro") old threads as this can create confusion and the old post may not be relevant any longer. Instead, you should open a new thread and link to the original as a reference.

Second, ALWAYS list the following when raising an issue:
1. FULL Ranorex version (currently only 6.2.1 and 6.1.1 are supported)
2. Windows version
3. Technology of system under test (SUT) (e.g.: Java, Flash/Flex, WPF, WinForms, HTML, etc.)
4. Ranorex Snapshot (NOT Screenshot) of the element in question
5. RanoreXPath of element in question
6. Full text of any error messages, if applicable.

Without this info it is very difficult to know the full situation and very hard to help. In this case, the Ranorex version and the snapshot are going to be very helpful.
Shortcuts usually aren't...