Ensure Visible Passing, Validate Visible Failing

Mobile Testing, Android App Testing.
Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Ensure Visible Passing, Validate Visible Failing

Post by Fergal » Tue Nov 24, 2015 3:28 pm

Ranorex 5.4.3, running on Windows 7, testing a website running on RXBrowser on Android 5.0.2.

When I run the module with the steps below, step 11 passes but step 12 fails - "(actual='False', expected='True')". Both steps are linked to the same repository item, which is a menu link. The menu item is clearly visible on the mobile device when the test is run.

Image

What are the possible causes of this?

Thanks!

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

Re: Ensure Visible Passing, Validate Visible Failing

Post by odklizec » Thu Dec 03, 2015 9:20 am

Hi Fergal,

Have you examine the problematic element with Spy? I mean its Visibility attribute? My guess is that this attribute somehow returns false, even though it's visible?

What you can try is to extend the repository element (its xpath) with and @visibility='true' attribute. Then add WaitForExists action before the validation step. So now the test should wait until the repo element (with enhanced path) exists. If it fails to find the element, there is definitely something wrong. The question is, if it's Ranorex issue or a problem with tested app.
Last edited by odklizec on Thu Dec 03, 2015 10:14 am, edited 1 time in total.
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

Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Ensure Visible Passing, Validate Visible Failing

Post by Fergal » Thu Dec 03, 2015 9:59 am

Thanks odklizec, I am in discussion with Ranorex support via email on this issue, however we still haven't got it resolved. I do have Wait For steps in the test and will try adding the visibility attribute as per your suggestion.

Thanks again!

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Ensure Visible Passing, Validate Visible Failing

Post by krstcs » Fri Dec 04, 2015 3:05 pm

Ensure Visible does no validation that it worked. It only attempts the action. So it passing means nothing in regards to the element actually being visible.

One thing that I have seen is that some web pages put up invisible overlays that the user can't see, but that actually cover up the underlying elements. The user can still click the location, and the underlying element will get the click, but the Ranorex system will see that the element is behind something else and tell you that it isn't visible, even though you can see it. This is an issue with the website design, usually, and not Ranorex.
Shortcuts usually aren't...

Fergal
Certified Professional
Certified Professional
Posts: 455
Joined: Tue Feb 18, 2014 2:14 pm
Location: Co Louth, Ireland
Contact:

Re: Ensure Visible Passing, Validate Visible Failing

Post by Fergal » Tue Dec 08, 2015 10:16 am

Thanks krstcs, I am still working with Ranorex support on this.
Ensure Visible does no validation that it worked. It only attempts the action.
Thanks for the clarification, I had thought that if the action could not be completed it would fail. One thing Ranorex support suggested and which does help, is to add delays of 2 to 4 seconds, before the validate visible actions.