I have some container in my application where html is generated and presented. Ranorex recognizes this as /dom element which is ok. In that container I have table body with table which cannot whole be placed so there issome scroll to scroll those table elements. Ranorex can detect table and normally scroll elements in this table, but the element which is in that table body and should be visible is not visible because this automatic scroll have appeared and element is beneath it. Technically, if there are no scroll element would be visible because is at the edge of this table body. Since ranorex thinks element is visible it clicks regular on place where is element. But since scroll is over that element click heappens to scroll, not to element. What can I do? If I scroll down a little bit some other element would be hidden by this scroll but in the t body area, so ranorex would think it is visible...

I've a similar issue in the grids in our AUT.
I've written my own code to check for location of the cell to click versus the window rectangle and then check if the scroll bar is present and visible... If all things fit the parameters I have my code click the line down button once to make sure that the cell to click is not covered by the scrollbar.

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!

WajdaW wrote:@Ciege: I cannot locate this scrollbar with ranorex, only it's container which is some TBody element I think.

Well if you can't find the scrollbar (not sure why not) you can also get the visible properties of the *NEXT* item in your view, which will be false if your current item is under the scrollbar. So if your next item is false, scroll down one.

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!

WajdaW wrote:Well, I think that could be time consuming. I have the solution for now, if something goes bad with it, I'll consider your suggestion.

Really? It's maybe 3 - 5 lines of code... And an extra couple of seconds in run time...

Your "solution" of

just scroll down to the bottom of this table before start searching for elements

introduces its own issues... What if your table is more than 2 pages long and the cell you want is on page 2? When you just scroll to the end of the table you will now be on page 3 and still unable to click the cell. What if you happen to run your code on a different machine with different resolution? Or if you happen to run with your AUT window not fully maximized? Etc...

In my experience, just "doing something" that works this time because it's the easy way out, is not necessarily doing the right thing. In test automation it really is up to the test developer to make your tests as bullet proof and future proof as possible. The more time and money you save in future maintainability of your code the quicker and better your ROI is. Just my 2 cents... I'm off my soapbox now...

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!

If you know the item just below the one you want to click at, you could first click on that item, which is outside the window area and therefore the visible area would be scrolled. Now you should also be able to see the one you want to click at.

Strange, it seems that ranorex today finds this element regular (scrolls and clicks on it), but fails to find some other elements which are even visible. Actually not fail like throws some exception, but instead clicks on some random place in document, which is even worse.
If element don't exist it should return timeout exception, not to click on random place in document.

We tried to reproduce your issues but it was all working as expected. Please can you send us a sample application which will allow us to reproduce your issues. Or could you send us a Ranorex Snapshot to [email protected] ?