Ranorex cannot click link that is "hidden" due to scrollbar
Posted: Mon Jan 27, 2014 9:20 pm
The app I am testing loads a treeview on the left-hand side. The treeview contains a number of links that, when selected, populate the rest of the UI with the associated config page. A number of these links contain expanders that reveal additional links when expanded, or in some cases additional nested expanders. When the page first loads (and all the expanders are closed), all of the treeview elements fit on the page. However, when they are all expanded, elements on the very top end up hidden, with an associated scrollbar becoming visible. Unfortunately, when Ranorex attempts to click a link that is outside the scrollbar area, I get this error:
Failed to move to location 'Center' within element '{Text:About}'.
The pointer cannot be moved to point '{X=61,Y=-340}' since it is outside of the visible desktop.
I should also mention that if I call the repository items directly from the code using repo (e.g. repo.MyApp.MyLink.click() ) it works fine and scrolls to the necessary element automatically. It's only when passing the XPath from my spreadsheet does this occur (Mouse.click(varAdminLink), where varAdminLink contains the XPath of the item in question). But because I've been told that I cannot pass the repo element via spreadsheet like I can with the XPath, I am forced to try it this way.
Is there some way to have Ranorex auto-scroll for these page elements, when they fall outside the scope of the scrollbar? Basically, my test case will only do two things (repeated for many iterations):
1) click link
2) validate page header loads
I want to keep this as generic as possible (only one test case, using a spreadsheet to iterate through the links), and not have to apply any special handling events or custom behavior that will only load a certain # of links, etc. Thanks in advance for any advice you might provide.
Failed to move to location 'Center' within element '{Text:About}'.
The pointer cannot be moved to point '{X=61,Y=-340}' since it is outside of the visible desktop.
I should also mention that if I call the repository items directly from the code using repo (e.g. repo.MyApp.MyLink.click() ) it works fine and scrolls to the necessary element automatically. It's only when passing the XPath from my spreadsheet does this occur (Mouse.click(varAdminLink), where varAdminLink contains the XPath of the item in question). But because I've been told that I cannot pass the repo element via spreadsheet like I can with the XPath, I am forced to try it this way.
Is there some way to have Ranorex auto-scroll for these page elements, when they fall outside the scope of the scrollbar? Basically, my test case will only do two things (repeated for many iterations):
1) click link
2) validate page header loads
I want to keep this as generic as possible (only one test case, using a spreadsheet to iterate through the links), and not have to apply any special handling events or custom behavior that will only load a certain # of links, etc. Thanks in advance for any advice you might provide.