React and Ranorex

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Nono
Posts: 20
Joined: Wed Oct 02, 2013 11:19 am

React and Ranorex

Post by Nono » Tue Sep 27, 2016 2:35 pm

Hi,

Is it just me or does React objects not applicable to use and test with Ranorex?
React objects are not being identified very well :(

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

Re: React and Ranorex

Post by odklizec » Tue Sep 27, 2016 7:14 pm

Hi,

I'm not familiar with React, but what 'exactly' is your problem? Could you please upload a Ranorex snapshot (not screenshot) of your GUI and a bit more detailed description of your problem?
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

Nono
Posts: 20
Joined: Wed Oct 02, 2013 11:19 am

Re: React and Ranorex

Post by Nono » Wed Sep 28, 2016 11:48 am

Hi,

Thank you for your quick reply :)
Basically I get tons of objects in a webpage that are all react objects. They vary only in the unique ID of the react tab, based in the middle of the xpath. I don't think that the dynamic ID blog post we are all familiar with will help in this particular scenario. See snapshot attached as a dropbox link...

Thanks!

https://www.dropbox.com/s/yh8s3e3rw1m52 ... rxsnp?dl=0

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

Re: React and Ranorex

Post by odklizec » Wed Sep 28, 2016 12:18 pm

Hi,

I've checked the snapshot and it looks pretty automatizable to me? I mean, there are many unique IDs with very reasonable names, so there should be no problem automating your app? Additionally, in case there are no IDs, you could use Class strings (or their parts using regexes). You could either add them manually to the recorded xpaths or you can modify the xpath weight so Ranorex recorder will prefer Class attributes over other attributes. A description how to modify the xpath weight can be found in the "dynamic ID" blog post you mentioned ;)

For example, this is the original xpath from snapshot you published (not very reliable xpath):
/dom[@domain='192.168.10.52']//div[#'tabs-Video']/div/div[1]/div[1]/div/div[1]/div[2]/div[2]/div/span
And this is what you get if you change the xpath weight of webelement >> class attribute to 100:
/dom[@domain='192.168.10.52']//div[#'tabs-Video']/div/div[@class='publish-main export columnMiddle']/div[1]/div/div[@class='settings_part']/div[2]/div[@class='editboxWrapper']/div/span
And after some quick manual editing, you can get something like this:
/dom[@domain='192.168.10.52']//div[#'tabs-Video']/div/div[@class='publish-main export columnMiddle']//div[@class='settings_part']/div/div[@class='editboxWrapper']/div[@class='input_icon clear']/span
This is much better xpath, don't you think? ;)
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