Are custom HTML5 attributes supported for mobile app?

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
User avatar
FelixK98
Posts: 54
Joined: Fri Apr 08, 2016 6:28 am

Are custom HTML5 attributes supported for mobile app?

Post by FelixK98 » Thu Jul 07, 2016 7:20 am

Hi Everyone,

I am wondering if Ranorex support custom HTML5 attributes (data-*) for mobile hybrid apps?
I got the following HTML/Web element:
<div data-auto="witness-session-header-card" class="mdl-card pi-patient-history-witness-session-header-card pi-tonal-one-background" data-reactid=".0.3.0.4:0.0" rxid="-171"><div data-auto="text" data-reactid=".0.3.0.4:0.0.0" rxid="-172">Yesterday, 2016-07-06, 04:57</div><div data-reactid=".0.3.0.4:0.0.1" rxid="-173"><div data-auto="cancelled-icon" class="pi-icon pi-cancelled" data-reactid=".0.3.0.4:0.0.1.0" rxid="-174"></div></div></div><div data-auto="witness-session-detail-card" class="mdl-card pi-patient-history-witness-session-detail-card pi-accent-one-color" data-reactid=".0.3.0.4:0.1:0" rxid="-175"><div data-auto="item-value" data-reactid=".0.3.0.4:0.1:0.0" rxid="-176"><span data-reactid=".0.3.0.4:0.1:0.0.0" rxid="-177">Paperwork</span><span data-reactid=".0.3.0.4:0.1:0.0.1" rxid="-178">, </span><span data-reactid=".0.3.0.4:0.1:0.0.2" rxid="-179">1234567</span></div><div data-reactid=".0.3.0.4:0.1:0.1" rxid="-180"></div></div>
I would like to be able identify elements using "data-auto" attribute.

If it is supported, could someone help me to setup Ranorex with object identification using custom attributes.

Thanks,
Felix.

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

Re: Are custom HTML5 attributes supported for mobile app?

Post by odklizec » Thu Jul 07, 2016 7:36 am

Hi,

Have you examined your app with Ranorex spy? If spy don't see these attributes, there is most probably nothing you can do to setup Ranorex to use them for identification purposes.
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
FelixK98
Posts: 54
Joined: Fri Apr 08, 2016 6:28 am

Re: Are custom HTML5 attributes supported for mobile app?

Post by FelixK98 » Thu Jul 07, 2016 7:50 am

Hi odklizec,

Yes, spy does not show any. But I looked at this forum topic:
http://www.ranorex.com/forum/are-custom ... t2861.html
and the answer was that Ranorex does support it for HTML5 within desktop browser, so I thought may be it should work for HTML5 on mobile browser as well.

Thanks,
Felix.

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

Re: Are custom HTML5 attributes supported for mobile app?

Post by odklizec » Thu Jul 07, 2016 8:02 am

Well, as I've mentioned, if some attributes are not visible in spy, they are most probably not supported (yet). In the post you mentioned, the sample link no longer works, but it can be examined via the wayback machine...
https://web.archive.org/web/20131110172 ... /test3.cfm

If you apply this xpath in spy...
/dom[@domain='web.archive.org']/body/div/div[@data-id='10']
it returns desired DIV and spy shows data-id in Dynamic section of properties. If the same does not apply for the mobile app, you are most probably out of luck.
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: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Are custom HTML5 attributes supported for mobile app?

Post by Support Team » Fri Jul 08, 2016 7:52 am

Hi Felix,

Unfortunately, dynamic html attributes are currently not supported for mobile apps and web pages, but there is already a feature request in our internal bug tracking system.

Currently, we do not know if and when this feature will be implemented. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.

Thank you for your understanding.

Sincerely,
Johannes
.
Image