How to select a tabpage which is initially not shown?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
BCTest
Posts: 127
Joined: Tue Jun 03, 2014 10:15 am
Location: Hamburg, Germany

How to select a tabpage which is initially not shown?

Post by BCTest » Thu Apr 20, 2023 8:35 am

Hi,

we want to select a tabpage which might be not shown initially:
How can Ranorex select a tabpage which can be visible or not?

As shown in the attached image and snapshot the tabpage "Mengenstaffel" (at Index 9) is not visible so a simple mouse-click won't select this tabpage. Humans simply click ``UpDown`` to make this tabpage visible, how could Ranorex act?
TabPage.png
Regards,
BCTest
You do not have the required permissions to view the files attached to this post.

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: How to select a tabpage which is initially not shown?

Post by Stub » Thu Apr 20, 2023 8:58 am

If not visible then click the UpDown until visible? I've no idea what EnsureVisible does on a tabpage as we have very few of those so I've not had to solve that problem before.

I've had to write a few things like that e.g. widen a column until the full rawtext that I'm looking for appears, or scroll a list until a certain item becomes visible. Sometimes I use the page jumping on scroll bars to get near, then revert to the up/down arrows to fine tune things.

BCTest
Posts: 127
Joined: Tue Jun 03, 2014 10:15 am
Location: Hamburg, Germany

Re: How to select a tabpage which is initially not shown?

Post by BCTest » Thu Apr 20, 2023 9:17 am

Stub wrote:
Thu Apr 20, 2023 8:58 am
If not visible then click the UpDown until visible?
This is actually our problem: How can we check, if we have to click UpDown or not?
As you can see in the attached image the feature Visible is True despite the tabpage is not visible.

Something like
While (!tabpage.Visible)
  UpDown.Click()

tabpage.Click()
won't work.
:cry:

Regards,
BCTest

User avatar
Stub
Posts: 515
Joined: Fri Jul 15, 2016 1:35 pm

Re: How to select a tabpage which is initially not shown?

Post by Stub » Thu Apr 20, 2023 9:42 am

Click until the coordinates fall within bounds of the dialog maybe?

No idea, haven't had to solve this problem before.

csaszi89
Posts: 42
Joined: Mon Jan 17, 2022 12:10 pm

Re: How to select a tabpage which is initially not shown?

Post by csaszi89 » Wed May 10, 2023 2:08 pm

Hi,
what if just simply use TabPage.Select() method?
The control should support this operation and it will select the proper tab page (regardless of visibility).