EnsureVisible and VisibleValidation on mobile element with ID

Mobile Testing, Android App Testing.
tomwolf
Posts: 18
Joined: Tue Feb 26, 2019 9:04 am

EnsureVisible and VisibleValidation on mobile element with ID

Post by tomwolf » Wed May 08, 2019 12:46 pm

Hello everyone,

I'm currently testing on a emulator from Android Studio running Android 9.0, but I've ran into a few problems in the past. I've been able to find a solution for these problems, but I still got a question. For every 'EnsureVisible' action I perform it on a element that doesn't require to be visible, because that's the only way it works. After that I sometimes want to perform a 'Wait for' action to ensure the element isn't visible before excuting any other action. I've been able to create a solution for this in two ways:
- Creating a Repository item based on the index with 'Visible' set to 'True', but this solution totaly isn't reliable.
- Creating two Repository items. The first one based on a 'ID' or 'Innertext' without anything else. The second one based on a 'ID' or 'Innertext' with 'Visible' set to 'True'.

There is nothing wrong with creating two Repository items, but it makes a little bit of a mess. So is there any other way to work around this without being unreliable or making two Repository items?

Detailed description of my system:
Windows 10 Enterprise
Ranorex 8.3.3
Service App 2.0.3 on Android

If there is anymore information needed, I would like to hear!

Regards,
Tom
Regards,

Tom Wolf

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

Re: EnsureVisible and VisibleValidation on mobile element with ID

Post by odklizec » Thu May 09, 2019 12:24 pm

Hi,

Could you please post a snapshot (NOT screenshot) of the app in question and post also an example of xpath(s) you are using. Thanks.
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

tomwolf
Posts: 18
Joined: Tue Feb 26, 2019 9:04 am

Re: EnsureVisible and VisibleValidation on mobile element with ID

Post by tomwolf » Thu May 09, 2019 12:48 pm

Hi Pavlov,

The mainscreen of the application:
HomeMenuOfTheApplication.rxsnp
Two samples where the problem is occuring:
Sample1.rxsnp
Sample2.rxsnp
If you need any more information I would like to hear!
You do not have the required permissions to view the files attached to this post.
Regards,

Tom Wolf

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

Re: EnsureVisible and VisibleValidation on mobile element with ID

Post by odklizec » Thu May 09, 2019 12:52 pm

Please post also example of two xpaths, you are using now.
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

tomwolf
Posts: 18
Joined: Tue Feb 26, 2019 9:04 am

Re: EnsureVisible and VisibleValidation on mobile element with ID

Post by tomwolf » Thu May 09, 2019 12:59 pm

Hi Pavlov,

For sample one:

Code: Select all

/mobileapp[@title='nl.afas.pocket2']//dom[@page='index.html']//tag[#'itemVak']/h2[@innertext='Vakantie']
Sample1.rxsnp
For sample three:

Code: Select all

/mobileapp[@title='nl.afas.pocket2']/form[@title='MainActivity']/container[@rid='content']/dom[@browsername='Ranorex Android Browser']/body/div[@visible='True']/div[2]/?/?/tag[@tagname='ion-content']/div//tag[3]/h2[@innertext='Vakantie/verlof']
Sample3.rxsnp
You do not have the required permissions to view the files attached to this post.
Regards,

Tom Wolf