Xamarin controls are not recognised

Mobile Testing, Android App Testing.
manustar47
Posts: 14
Joined: Mon Jul 27, 2015 2:17 pm

Xamarin controls are not recognised

Post by manustar47 » Tue Nov 03, 2015 1:21 pm

Hi,

Am working on an Android app developed using Xamarin. except button, container and form all other objects are recognized as AndroidElement/Unknown. could somebody help me in this?

Thanks & Regards,
Manu

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

Re: Xamarin controls are not recognised

Post by odklizec » Thu Nov 05, 2015 9:09 am

Hi,

It would be useful, if you could post a Ranorex snapshot of your AUT. Are you experiencing any particular problems with AndroidElements or are you just uncomfortable to see all elements like AndroidElements/Unknown?
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

manustar47
Posts: 14
Joined: Mon Jul 27, 2015 2:17 pm

Re: Xamarin controls are not recognised

Post by manustar47 » Fri Nov 06, 2015 11:34 am

Hello,

I can not share app screenshot. but this is how Rxpath of a button looks like:

/mobileapp[@title='***']/form[@title='MainActivity']/container/container/androidelement/androidelement/androidelement/androidelement/androidelement/androidelement[1]/androidelement/androidelement[1]/androidelement/androidelement[2]/androidelement[1]/androidelement[2]/androidelement/picture

It takes around 30 Seconds to identify and click on this picture.

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

Re: Xamarin controls are not recognised

Post by odklizec » Fri Nov 06, 2015 2:06 pm

Hi,

I'm afraid, rxpath alone is not very helpful. It only shows that there are no unique attributes in your GUI, which could be used for reasonable identification of elements. I don't have any clue if it's because of the fact it's xamarin app, or simply because your app is not automation friendly as such.

If you cannot share the snapshot at public forum (please don't mix it with screenshot), send the snapshot directly to Ranorex support at [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

IPuser
Posts: 3
Joined: Sat Mar 12, 2016 9:33 am

Re: Xamarin controls are not recognised

Post by IPuser » Wed Apr 13, 2016 2:44 pm

Hi,
Any updates on this issue?

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

Re: Xamarin controls are not recognised

Post by odklizec » Wed Apr 13, 2016 3:15 pm

Hi,

What kind of update do you expect? ;) If you are experiencing similar problem, please upload Ranorex snapshot of the problematic element. Eventually, send it to Ranorex support (ideally, along with sample app). I'm afraid, there is nothing anyone here can do or suggest without snapshot and/or sample app.
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

zivshapirawork
Posts: 65
Joined: Wed Sep 24, 2014 7:47 am
Location: Israel

Re: Xamarin controls are not recognised

Post by zivshapirawork » Tue Apr 19, 2016 5:25 am

you can add a value to a property (e.g. id) of the picture , and then find it by .//picture[@id='myId']
just ignore the rest of the path, and it will find the picture fast

IPuser
Posts: 3
Joined: Sat Mar 12, 2016 9:33 am

Re: Xamarin controls are not recognised

Post by IPuser » Mon May 09, 2016 11:03 am

Hi,

Our UI controls did't have IDs and in order to add IDs that are visible in Ranorex Spy, i've updated Xamarin.Forms (from 2.0.x to 2.2.x) and i've used AutomationID property for controls. This AutomationID is visible in Ranorex Spy as Content description (or something like that).

Thanks!