Page 1 of 1

Button Visible is "False" but element visible and clickable

Posted: Tue Jun 13, 2017 1:54 pm
by MarcinB
Hi, I have problem with button element visibility. In the iOS (10.2.1) button is visible in UI, but in Ranorex Spy element has got property Visible set to "False".



Buttons that were added in the storyboard have right value of visibility (it is set to true). But when we are adding navigation buttons from code, Ranorex sees them as unvisible (property visibility is set to false), although they are available and can be used in the application.

Re: Button Visible is "False" but element visible and clickable

Posted: Thu Jun 15, 2017 3:39 pm
by Support Team
Hi MarcinB,

May I ask you if you could upload a Ranorex Snapshot to the forum post? This would allow me to take a closer look at the issue.

Thank you in advance.
Regards,
Markus (S)

Re: Button Visible is "False" but element visible and clickable

Posted: Mon Jun 19, 2017 3:13 pm
by MarcinB
I can't provide snapshot for now, but I tested this situation on two different iOS version.
On iOS 10.2.1 button is visible on UI but in RanorexSpy it is visible as Visible = False.
On iOS 10.3.1 button is visible on UI and in RanorexSpy too, this is correct behaviour.
Problem exists on iOS 10.2.1

Re: Button Visible is "False" but element visible and clickable

Posted: Wed Jun 21, 2017 1:50 pm
by Support Team
Hi MarcinB,
Thank you for the additional information.

Unfortunately it seems to be a bug in iOS 10.2.1 since we get those values directly from the application under test. May I ask you if you could double check the value by debugging the application itself?

Please do let me know the outcome of this debugging process.
Thank you in advance.

Regards,
Markus (S)

Re: Button Visible is "False" but element visible and clickable

Posted: Fri Jul 14, 2017 12:26 pm
by MarcinB
Checked during debugging, visibility is true.

Steps:
Run failing test in debug mode - set break point on checking visibility of non visible control.
Check with RanorexSpy visibility of element = false
Reset RX service
RanorexSpy: refresh connection to RX service and next refresh mobile content
Check control properties: if it is visible then continue test.
Next rerun form for example commandline using MsTest give visibility = true.
When we restart the application manually or by using Guided Access visibility becomes false.

Re: Button Visible is "False" but element visible and clickable

Posted: Tue Jul 18, 2017 9:10 pm
by Support Team
Hi Marcin,

I'm afraid there is a misunderstanding concerning the debugging.
I meant to debug the application using XCode on a Mac environment. This allows you to see the actual value of this property.

Ranorex gets those values directly from the application and shows this value in Ranorex as attribute.

Please do let me know if you need any further assistance.

Regards,
Markus (S)

Re: Button Visible is "False" but element visible and clickable

Posted: Thu Jul 20, 2017 1:16 pm
by Szymon P.
Hi TeamSupport.

Regaring to Marcin B. - small explanation.
We use Ranorex as library - not as Ranorex Studio.

To investigate problem we do following process:
1. [Mobile] Run application - go to screen with problematic control
2.[RanorexSpy] Check visibility property
3. [Mobile] if visible = false then restart RanorexService (only RX!)
4. [RanorexSpy] Refresh endpoint
5. [RanorexSpy] Refresh Browser&Result
6. [RanorexSpy] Check visibility property
7. [Mobile] Execute test once again (via MSTest)

I don't think that moving app to background and reactivation will influence on some controls visibility.
We check that in following way:
1. [Mobile] Run application - go to screen with problematic control
2. [RanorexSpy] Check visibility property
3. [Mobile] if visible = false then move app to background and make it active again (RX Service is still working!)
4. [RanorexSpy] Refresh endpoint
5. [RanorexSpy] Refresh Browser&Result
6. [RanorexSpy] Check visibility property - it is still false

Re: Button Visible is "False" but element visible and clickable

Posted: Thu Jul 27, 2017 4:20 pm
by Support Team
Hi Szymon,

I'm unfortunately not exactly sure if your described process is related to the issue MarcinB is having.
May I ask you if you could add additional information to your post?

Thank you in advance.

Regards,
Markus (S)

Re: Button Visible is "False" but element visible and clickable

Posted: Fri Jul 28, 2017 12:01 pm
by MarcinB
@Support Team

We are working in the same team. Szymon provided more detailed description of some kind of workaround which makes that Visible parameter is recognized correctly.

Re: Button Visible is "False" but element visible and clickable

Posted: Thu Aug 10, 2017 12:27 pm
by MarcinB
@Support Team
Any updates ? Can you try to investigate the problem. I installed the newest iOS and Ranorex 7.1.0 and there is still the same problem. In Spy Visibility of element is False, but element is visible and clickable on device.
We have about 50 cases with this problems from 600 tests. Can you help with this issue?

Re: Button Visible is "False" but element visible and clickable

Posted: Thu Aug 10, 2017 2:24 pm
by odklizec
Hi Marcin,

I may be wrong, but I believe Markus from support already answered your problem here:
https://www.ranorex.com/forum/button-vi ... tml#p44373

The problem appears to be a bug in iOS 10.2.1, which returns incorrect state of element visibility. In other words, there is nothing Ranorex folks could do about iOS bugs ;) The solution is to avoid this particular version of iOS for testing, eventually, ignore failures related to visibility status when testing on iOS 10.2.1.

Re: Button Visible is "False" but element visible and clickable

Posted: Fri Aug 11, 2017 7:14 am
by MarcinB
Actually I have Ranorex 7.1.0 and iOS 10.3.3 and problem still exists. It exists also on iOS9.
I mentioned in the first post, that some situation can have impact on this problem.

"Buttons that were added in the storyboard have right value of visibility (it is set to true). But when we are adding navigation buttons from code, Ranorex sees them as unvisible (property visibility is set to false), although they are available and can be used in the application."

Re: Button Visible is "False" but element visible and clickable

Posted: Fri Aug 11, 2017 7:25 am
by odklizec
Hi,

In this case, I think Ranorex support would need access to your app to debug the problem. Or at very least a small "hello word" sample (with just one button) showing the problem. Please post either your AUT or demo to [email protected].

Re: Button Visible is "False" but element visible and clickable

Posted: Wed Aug 16, 2017 8:07 pm
by Support Team
Hi Marcin,

Please excuse the slow response, I somehow missed the notification.

As already mentioned, the visibility state, which is shown incorrectly in our Spy, is provided directly from the application under test. Ranorex only checks the isHidden attribute of the corresponding UiView and returns true or false.
To verify that, you could for example add a logging mechanism to the application. For example: you could create a NSLog in your non-instrumented application which logs the current state of your button.

If the value does not match our value within Ranorex Spy, please contact us directly at [email protected] or [email protected]

We would be happy to analyze this behavior in more detail.

Regards,
Markus (S)