This is a migrated thread and some comments may be shown as answers.

How to compare the two cells data in same excel sheet?

1 Answer 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Priyanka
Top achievements
Rank 1
Priyanka asked on 30 Apr 2013, 06:13 AM
Hi telerik team.

I want to compare the data for the same column in excel sheet.
I am adding the records in application using excel sheet, and i want to check the SSN number duplication.
If the SSN number is already exist for another patient then Fail should be displayed in excel sheet.
Please help me to find the solution.

Thanks......

1 Answer, 1 is accepted

Sort by
0
Byron
Telerik team
answered on 03 May 2013, 03:31 PM
Hello Priyanka,

It appears that you are inputting data into your target application using steps that are data-bound to an Excel spreadsheet. If you wish to confirm that the contents of the application match the expected value in the Excel spreadsheet, you can assert that the value of a target element matches that from the spreadsheet:

//Reference a column by name
Assert.IsTrue(ActiveBrowser.ContainsText(Data["Col1"].ToString()));

You can use a data-bound verification step as the condition for an if block, and then perform another verification step if the previous verification is true. 

If these suggestions do not accomplish your goal, please tell us more about your scenario. It appears that you want to test the case of SSN duplication. If the test inputs a duplicate SSN, should the application display an error message? Does the Excel spreadsheet contain a column that indicates whether the case contains a duplicate? A Jing video of the behavior may also help us diagnose your issue. Thanks for helping us advise you.

Regards,
Byron
the Telerik team
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Priyanka
Top achievements
Rank 1
Answers by
Byron
Telerik team
Share this question
or