Ranorex cannot click link that is "hidden" due to scrollbar

Ask general questions here.
hnporter
Posts: 18
Joined: Thu Jan 16, 2014 3:34 pm

Ranorex cannot click link that is "hidden" due to scrollbar

Post by hnporter » 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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by Support Team » Thu Jan 30, 2014 6:36 pm

Hello hnporter,

May I ask which Technology is used in your application (for example, WPF, WinForms, WEB, ...).
Have you already tried to add an "Ensure Visible" action or a "Invoke Action" (Focus) action before the click action?
Additionally can you provide a Ranorex Snapshot file?
Please read the section "Creating Ranorex Snapshot Files" in our user guide in order to get a detailed description how to create a Ranorex Snapshot file.

Regards,
Bernhard
.
Image

hnporter
Posts: 18
Joined: Thu Jan 16, 2014 3:34 pm

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by hnporter » Thu Jan 30, 2014 8:02 pm

The app is WPF with SQL on the back end. I did try EnsureVisible, though it's possible I am misunderstanding its intended usage. The code looks like:

Ranorex.Text myTest = varAdminLink;
myTest.EnsureVisible();
Mouse.Click(varAdminLink);

It does appear that EnsureVisible returns FALSE for the element it can't locate, but it goes no further than that. Is it supposed to handle it in any additional way?

As for a snapshot, I would be happy to oblige; a couple of questions, though - 1) what exactly did you want a snapshot of? It's my understanding that I take a snapshot from within Ranorex Spy...did you want a snapshot of the app in question? And 2) did you want it just attached as a reply to this thread?

Thanks again!

hnporter
Posts: 18
Joined: Thu Jan 16, 2014 3:34 pm

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by hnporter » Tue Feb 04, 2014 7:51 pm

Anything additional on this? I replied to support's requests, but have heard nothing additional. Thanks!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by Support Team » Wed Feb 05, 2014 4:39 pm

Hello hnporter,

Thank you for the information. I need a snapshot because there are a lot of additional information about your application under test. We can also have a remote session in order to analyze the issue in more detail on your machine directly.
Please send an email to [email protected] in order to arrange an appointment for the remote session.

Regards,
Bernhard
.
Image

hnporter
Posts: 18
Joined: Thu Jan 16, 2014 3:34 pm

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by hnporter » Thu Feb 06, 2014 2:14 pm

Please see my additional questions in the earlier response - 1) what exactly did you want a snapshot of? It's my understanding that I take a snapshot from within Ranorex Spy...did you want a snapshot of the app in question? And 2) did you want it just attached as a reply to this thread?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by Support Team » Fri Feb 07, 2014 5:59 pm

Hi hnporter,

Yes, I would say that you can send a snapshot of the whole application.
If you don't want to post it to the forum you can also send an email to [email protected].

Regards,
Bernhard
.
Image

hnporter
Posts: 18
Joined: Thu Jan 16, 2014 3:34 pm

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by hnporter » Thu Feb 13, 2014 7:45 pm

Apologies for the delay in response. I've sent the snapshot to the support email, please let me know if there's anything else you need. Thanks again!

xiaoyuandlg
Posts: 1
Joined: Thu Feb 20, 2014 7:56 am

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by xiaoyuandlg » Thu Feb 20, 2014 8:02 am

I've got into the same question.

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Ranorex cannot click link that is "hidden" due to scrollbar

Post by Support Team » Mon Feb 24, 2014 5:28 pm

Hi xiaoyuandlg,

Unfortunately we could not resolve the issue until now. Can you please post a Ranorex Snapshot of your application?

Regards,
Bernhard
.
Image