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

Dynamically Generated Grid Verification

4 Answers 64 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jai
Top achievements
Rank 1
Jai asked on 20 Jan 2015, 04:26 AM
Hi,

I have a requirement where I have to verify the each content on Kendo grid and then click on it.All the contents in this grid is auto post values,We are able to modify the dose field alone.

This grid was developed by using kendo gird, I can't be able to verify it even after recording it and tried little c# codes :

KendoGrid grid = ActiveBrowser.Find.ById<KendoGrid>("grid");
foreach (KendoGridDataItem row in grid.DataItems)
{
 if (row.Cells[1].InnerText.Contains("250:00"))
{
   ConfirmDialog cd = new ConfirmDialog(ActiveBrowser, DialogButton.OK);
   Manager.DialogMonitor.AddDialog(cd);
   Manager.DialogMonitor.Start();

   row.Cells[1].MouseClick();

   cd.WaitUntilHandled();
   Manager.DialogMonitor.RemoveDialog(cd);
  }
}
- Above Coded step also not fulfilled my scenario.

These are the following scenarios,I need to verify :

Scenario 1 :
Need to verify the respective Time,Dose's are posted correctly while at the first time of grid open.

Scenario 2 :
Whenever i am changing the value of dose field in grid,it should affect this parent control(dose).


Please,Help me on this

4 Answers, 1 is accepted

Sort by
0
Jai
Top achievements
Rank 1
answered on 22 Jan 2015, 05:10 AM
Hi
Here the sample workout for the problem i have mentioned above. It illustrates, How the Dynamically generated grid process in detail .

You can find this by using this link :

http://jsfiddle.net/Rajesh989/vy7earq5/1/     

I hope this will helps you to find the solution easily and will help you to find the problem easily.







0
Cody
Telerik team
answered on 23 Jan 2015, 12:09 AM
Hi Jai,

The first concern I have is that you're looking for a grid having id of "grid"

KendoGrid grid = ActiveBrowser.Find.ById<KendoGrid>("grid");

But your screen shot shows the id of the Kendo grid to be grdUDFrequency.

The HTML generated by JSFiddle is significantly different from the HTML shown in your screen shot. I don't want to use it because I don't think a solution that works in JSFiddle will work on your real web site.

Instead of screen shots, an export of your full DOM would be far more useful to us. Instead I created some code that validates the content of the first column of the first three rows of our demo page. Hopefully this will help point you in the right direction.

KendoGrid grid = ActiveBrowser.Find.ById<KendoGrid>("grid");
 
Assert.AreEqual<string>("Maria Anders", grid.DataItems[0].Cells[0].InnerText);
Assert.AreEqual<string>("Ana Trujillo", grid.DataItems[1].Cells[0].InnerText);
Assert.AreEqual<string>("Antonio Moreno", grid.DataItems[2].Cells[0].InnerText);


Regards,
Cody
Telerik
 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Jai
Top achievements
Rank 1
answered on 29 Jan 2015, 09:10 AM
Hi,

Thanks for the reply . Its working fine now. Thanks for your efforts .
0
Cody
Telerik team
answered on 30 Jan 2015, 02:04 AM
Hello Jai,

I'm glad I could help! Thank you for the update.


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