Page 1 of 1

cross-referencing xml file with gui

Posted: Mon Apr 14, 2014 4:00 pm
by joetech
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?

Re: cross-referencing xml file with gui

Posted: Tue Apr 15, 2014 7:49 am
by mzperix
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

Re: cross-referencing xml file with gui

Posted: Tue Apr 15, 2014 1:31 pm
by joetech
thx for the clue, Zoltan!