Page 1 of 1

Are custom HTML5 attributes supported for mobile app?

Posted: Thu Jul 07, 2016 7:20 am
by FelixK98
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.

Re: Are custom HTML5 attributes supported for mobile app?

Posted: Thu Jul 07, 2016 7:36 am
by odklizec
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.

Re: Are custom HTML5 attributes supported for mobile app?

Posted: Thu Jul 07, 2016 7:50 am
by FelixK98
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.

Re: Are custom HTML5 attributes supported for mobile app?

Posted: Thu Jul 07, 2016 8:02 am
by odklizec
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.

Re: Are custom HTML5 attributes supported for mobile app?

Posted: Fri Jul 08, 2016 7:52 am
by Support Team
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