Button Visible is "False" but element visible and clickable

Mobile Testing, Android App Testing.
MarcinB
Posts: 6
Joined: Tue Jun 13, 2017 1:41 pm

Button Visible is "False" but element visible and clickable

Post by MarcinB » Tue Jun 13, 2017 1:54 pm

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.
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Thu Jun 15, 2017 3:39 pm

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)

MarcinB
Posts: 6
Joined: Tue Jun 13, 2017 1:41 pm

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

Post by MarcinB » Mon Jun 19, 2017 3:13 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Wed Jun 21, 2017 1:50 pm

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)

MarcinB
Posts: 6
Joined: Tue Jun 13, 2017 1:41 pm

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

Post by MarcinB » Fri Jul 14, 2017 12:26 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Tue Jul 18, 2017 9:10 pm

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)

Szymon P.
Posts: 1
Joined: Thu Jul 20, 2017 12:44 pm

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

Post by Szymon P. » Thu Jul 20, 2017 1:16 pm

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

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Thu Jul 27, 2017 4:20 pm

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)

MarcinB
Posts: 6
Joined: Tue Jun 13, 2017 1:41 pm

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

Post by MarcinB » Fri Jul 28, 2017 12:01 pm

@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.

MarcinB
Posts: 6
Joined: Tue Jun 13, 2017 1:41 pm

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

Post by MarcinB » Thu Aug 10, 2017 12:27 pm

@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?

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Thu Aug 10, 2017 2:24 pm

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.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

MarcinB
Posts: 6
Joined: Tue Jun 13, 2017 1:41 pm

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

Post by MarcinB » Fri Aug 11, 2017 7:14 am

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."

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

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

Post by odklizec » Fri Aug 11, 2017 7:25 am

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].
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

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

Post by Support Team » Wed Aug 16, 2017 8:07 pm

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)