validating multiple excel files with the same tests

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
Posts: 10
Joined: Tue Mar 15, 2016 11:32 am

validating multiple excel files with the same tests

Post by » Mon Jun 06, 2016 10:35 am


One of the test cases I am currently working on involves uploading a document to an online database and then manually adding and deleting data to that document.. The purpose of these tests is the check the excel output function of our website, so I produce several excel files at various steps along the way. The excel files up to this stage all have the same name so identification and validation isnt a problem up to here.

The issue im having is that I then need to rerun the test case for regression testing. When I upload the document again, it is considered a new document and the excel output from then on will have a different name, which means that the path for the items in the repository wont work.

The names of the excel files are randomly generated, but they are the same for each document we create.

Is there anything I can do to tell Ranorex that the path for specific elements may change, but they will always be on the active excel window?


Posts: 10
Joined: Tue Mar 15, 2016 11:32 am

Re: validating multiple excel files with the same tests

Post by » Mon Jun 06, 2016 10:47 am

The only option I can think of is changing the system so the Excel output is consistently named, with only the last part of the name changing to distinguish between the different documents.

Are there any other options?

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

Re: validating multiple excel files with the same tests

Post by odklizec » Tue Jun 07, 2016 10:05 am


Could you please post an example of random excel name and ideally, also affected xpath's, which are stored in repository? Maybe a clever regex could solve 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
Posts: 10
Joined: Tue Mar 15, 2016 11:32 am

Re: validating multiple excel files with the same tests

Post by » Wed Jun 08, 2016 5:16 pm


In the example I am working on at the moment, the Excel filename is D84ED8A7-E60F-49BA-896B-D4D3D6F.

This file will be created using specific options, what I am testing is that the various options all work as intended, with an Excel file being created and validated for each option. The options basically determine what is included in the Excel output. In this case, the filename of each Excel file created will be the same.

Part of the tests include deleting the document that the excel file is created from, and then uploading it to our online system again, and then running the same tests again, but once the original document is deleted and uploaded again, even if it is the same document, the filename of the Excel file will now be different, such as C9DDEBAA-8077-48C5-BDA3-A2E4869DB718.

When I run the validation checks, I will still be checking the same cells as in the previous document, but im concerned that because the filename is different, Ranorex will not be able to find the cells as their path is looking for the first document.

Something I have noticed in the repository is that some of the cells/elements are listed in a sub-folder of the main Excel folder, im not sure if it is useful.

One of the cells I check is C9, this is the path of that element:


Something else that I have noticed, some of the other cells im checking are in a subfolder of the Excel repository item (called MicrosoftExcelD84ED8A7E60F49BA896). In the Path column in the repository for the subfolder, it says Base: .//table[@name='D84ED8A7-E60F-49BA-896B-D4D3D6F'] and the cells in that subfolder have simple paths such as /row[@index='15']/cell[@address='R15'].

Ive attached a screenshot to show this.

I can see that the full path is the same as cell C9 above, but why has Ranorex sorted some of the cells into a subfolder with a base path while other cells are listed with the full path?

Back to the main question - im still learning about the paths but could I get these tests to work with any open excel file if I remove the table name from the path?

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: validating multiple excel files with the same tests

Post by Support Team » Tue Jun 14, 2016 1:51 pm

Hi Steve,

In order to analyze your intention in more detail, please write an email to [email protected].
We could arrange a remote session to take a deeper look into your purpose.

I'm looking forward to your email.

Best regards,