Hi,
I tried to execute the following example http://www.ranorex.com/blog/wp-content/ ... orV2.0.zip in Ranorex 2.0 Preview version.
The problem is (it may not be a problem) that after executing the first test case (i.e. “Addition”), the systems prompts to ask if we want to save the “Calc2003.xls” file and the automation stops after that. Please let me know if this is as expected.Am I missing something ?
I would also like to know the reliability of “Data driven test automation with Excel” in general.
Cheers,
Automation with Excel
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Hi,
The attached excel file is saved in compatibility mode. Could you please rename and save the file using your installed office version? Maybe the "Save as" dialog is caused by using another office version.
The posted example is used to explain the possibilities with Ranorex in combination with Office COM libraries. You can also export your excel data to a simple CSV file, what is much easier to read using the File and StreamReader Namespaces of the .NET Framework.
Christoph,
Ranorex Support Team
The attached excel file is saved in compatibility mode. Could you please rename and save the file using your installed office version? Maybe the "Save as" dialog is caused by using another office version.
The posted example is used to explain the possibilities with Ranorex in combination with Office COM libraries. You can also export your excel data to a simple CSV file, what is much easier to read using the File and StreamReader Namespaces of the .NET Framework.
Christoph,
Ranorex Support Team
-
- Posts: 29
- Joined: Wed Jan 07, 2009 1:15 pm
Hi Christoph,
Thanks. The "Save As" dialogue issue is resolved.
What I am still stuck at is, according to my understanding, the way the "Test1()" method is implemented, it should read all the test cases in the excel file and execute them one after the other(As you know, there are 12 test cases in this case). But the automation stops after the first test case itself!!
Is my understanding of the implementation wrong? Or am I missing something again?
Cheers,
Thanks. The "Save As" dialogue issue is resolved.

What I am still stuck at is, according to my understanding, the way the "Test1()" method is implemented, it should read all the test cases in the excel file and execute them one after the other(As you know, there are 12 test cases in this case). But the automation stops after the first test case itself!!
Is my understanding of the implementation wrong? Or am I missing something again?

Cheers,
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
-
- Posts: 29
- Joined: Wed Jan 07, 2009 1:15 pm
Hi Christoph,
First of all I did the following changes to the code as I was getting some comilation errors. Please let me know if they are as expected.As I am using Ranorex for the first time I don't quite know what is changed in Version 2.0 as compared to version 1.5.
Please let me know if I am missing something.
I will also like to know how I can continue running the remaining test even if some test fails in between.In other words, how can I execute the "finally" block at the end after all the tests have been executed?
Cheers,
First of all I did the following changes to the code as I was getting some comilation errors. Please let me know if they are as expected.As I am using Ranorex for the first time I don't quite know what is changed in Version 2.0 as compared to version 1.5.
- Line no.73 is changed to
Code: Select all
Ranorex.Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
as the line gave me an errorCode: Select all
Ranorex.Core.Keyboard.AbortKey = System.Windows.Forms.Keys.Pause;
Line No. 82The type or namespace name 'Keyboard' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?) (CS0234) - D:\Projects\ACS\Ranorex\RanorexStudio Projects\ExcelTestDataConnectorV2.0\MainForm.cs:73,21is changed toCode: Select all
catch (Ranorex.RanorexException ex)
as it gave an errorCode: Select all
catch (Ranorex.Core.RanorexException ex)
Line No.102The type or namespace name 'RanorexException' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?) (CS0234) - D:\Projects\ACS\Ranorex\RanorexStudio Projects\ExcelTestDataConnectorV2.0\MainForm.cs:82,28was changed toCode: Select all
throw new Ranorex.RanorexException("Calculator application form not found!");
as it gave an errorCode: Select all
throw new Ranorex.Core.RanorexException("Calculator application form not found!");
Line No.119The type or namespace name 'RanorexException' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?) (CS0234) - D:\Projects\ACS\Ranorex\RanorexStudio Projects\ExcelTestDataConnectorV2.0\MainForm.cs:102,23was changed toCode: Select all
Ranorex.Validate.Attribute(text, "text", testData.Outputs[0] + ", ");
as it gave an errorCode: Select all
Ranorex.Core.Validate.Attribute(text,"text",testData.Outputs[0] + ",");
The type or namespace name 'Validate' does not exist in the namespace 'Ranorex' (are you missing an assembly reference?) (CS0234) - D:\Projects\ACS\Ranorex\RanorexStudio Projects\ExcelTestDataConnectorV2.0\MainForm.cs:119,25
Please let me know if I am missing something.
I will also like to know how I can continue running the remaining test even if some test fails in between.In other words, how can I execute the "finally" block at the end after all the tests have been executed?
Cheers,
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Hi
Could you please replace the code line no. 119 with following:
Additionally, it is required to add following using statement:
best regards,
Christoph
Ranorex Support Team
Could you please replace the code line no. 119 with following:
Code: Select all
Ranorex.Validate.Attribute(text, "text", new Regex(testData.Outputs[0] + ",|."));
Code: Select all
using System.Text.RegularExpressions;
Christoph
Ranorex Support Team