Dynamically Generated Grid Verification

5 posts, 0 answers
  1. Jai
    Jai avatar
    9 posts
    Member since:
    Oct 2014

    Posted 19 Jan 2015 Link to this post

    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
  2. Jai
    Jai avatar
    9 posts
    Member since:
    Oct 2014

    Posted 21 Jan 2015 in reply to Jai Link to this post

    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.







  3. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Jan 2015 Link to this post

    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
     
  4. Jai
    Jai avatar
    9 posts
    Member since:
    Oct 2014

    Posted 29 Jan 2015 in reply to Cody Link to this post

    Hi,

    Thanks for the reply . Its working fine now. Thanks for your efforts .
  5. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 29 Jan 2015 Link to this post

    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
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!