cross-referencing xml file with gui

Ask general questions here.
joetech
Posts: 2
Joined: Mon Apr 14, 2014 3:54 pm

cross-referencing xml file with gui

Post by joetech » Mon Apr 14, 2014 4:00 pm

Need to verify that the contents of an xml file(s) are correctly implemented in the GUI of a windows-based software I am currently testing. Any ideas how I could get this done with ranorex?

mzperix
Posts: 137
Joined: Fri Apr 06, 2012 12:19 pm

Re: cross-referencing xml file with gui

Post by mzperix » Tue Apr 15, 2014 7:49 am

Hi joetech,

Does the xml file describe the structure of the GUI? Like a .xaml or .aspx file? Or it contains only the data, that is shown in the screen?

If it is the fisrt case, then here is what is would do:
1. I would use an xml parser, so I could identify the different controls and compute their position on screen
2. I would create an xpath from those controls, based on their attributes (this needs some research with SPY, so you can see which attributes are identified by Ranorex)
3. With the correct Xpath and element position, I would do an Exists()

Make note, that Ranorex does not provide built-in solution for steps 1 and 2. You have to use coding. Since the programming language is C#, there are numerous xml parser libraries, I even saw a built-in one (http://msdn.microsoft.com/en-us/library ... s.95).aspx).

Regards,
Zoltán

joetech
Posts: 2
Joined: Mon Apr 14, 2014 3:54 pm

Re: cross-referencing xml file with gui

Post by joetech » Tue Apr 15, 2014 1:31 pm

thx for the clue, Zoltan!