Excel Iteration Binding

7 posts, 0 answers
  1. kokila
    kokila avatar
    2 posts
    Member since:
    Feb 2015

    Posted 12 Mar 2015 Link to this post

    Hi,

       I am having a test and I have bind an excel for that test (excel contains 5 records). While executing the test , for first Iteration all functions are done perfectly, the same when goes for second & Third & fourth & fifth, iterations "mouseclick" and "mousehover" is not executed.


    Thanks,

  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 13 Mar 2015 Link to this post

    Hello Kokila,

    Please elaborate what you mean and what you actually see happening when the test runs with your statement ""mouseclick" and "mousehover" is not executed.". Do these steps fail? What's the error message? Does Test Studio simply not execute them?

    Please let the test fail then go to Step Failure Details, find and click Export then attach the generated .zip file. It contains valuable information we need to diagnose this type of failure.

    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. kokila
    kokila avatar
    2 posts
    Member since:
    Feb 2015

    Posted 14 Mar 2015 in reply to Cody Link to this post

    Hai,

          I have shared the Test execution video, Field/control appearance video, and a file with codes used in the test script. We are using the Kendo Ui controls and Metronic Themes for development. Kindly Check with those files.

    Note :
    Test execution video - https://www.dropbox.com/s/dd8y2bv9ec72l3h/Video_2015-03-14_AutomationTesting.wmv?dl=0
    Field/control appearance video - https://www.dropbox.com/s/s3aatbva3xok104/Video_2015-03-14_DetailRegardingFields.wmv?dl=0
    codes File - https://www.dropbox.com/s/x6nzga5rwie5wb0/Codedsteps.txt?dl=0

    Regards,
    Kokila

  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 16 Mar 2015 Link to this post

    Hello Kokila,

    Thank you for the additional information. Please point out to me where in your 9 minute video does the problem show. Is it at the point shown in the attached frame grab?

    The one thing I notices is that the mouse is moving to position 0, 0. There are two possibilities for this.

    1) It's finding the wrong element, one that is hidden.
    2) It's using an outdated cached version of the DOM. This one is easier to over come. If this is the problem simply adding an ActiveBrowser.RefreshDomTree(); call will fix it... like this:

    [CodedStep(@"Diagnosis Type")]
    public void Diagnosis_Scenario_checking_addmode_CodedStep1()
    {
        string diagtypfrmxl = (string)(System.Convert.ChangeType(Data["Diagnosis Type"], typeof(string)));
        HtmlDiv parent = Manager.ActiveBrowser.Find.ById<HtmlDiv>("diagscroll");
        parent.Focus();
        parent.MouseHover();
        HtmlInputText diagtypetxt = parent.Find.ByExpression<HtmlInputText>("aria-owns=editdigtype_listbox");
        diagtypetxt.Focus();
        ActiveBrowser.Manager.Desktop.KeyBoard.KeyPress(ArtOfTest.WebAii.Win32.KeyBoard.KeysFromString("Ctrl+A"), 150, 1);
        Manager.ActiveBrowser.Desktop.KeyBoard.KeyPress(ArtOfTest.WebAii.Win32.KeyBoard.KeysFromString("Del"), 150, 1);
        Manager.ActiveBrowser.Desktop.KeyBoard.TypeText(diagtypfrmxl.Substring(0,3));
        System.Threading.Thread.Sleep(200);
        ActiveBrowser.RefreshDomTree();
        HtmlListItem diagtypelistli = Manager.ActiveBrowser.Find.ById<HtmlListItem>("editdigtype_option_selected");
        diagtypelistli.Refresh();
        diagtypelistli.MouseHover();
        diagtypelistli.MouseClick();
    }



    Regards,
    Cody
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  5. kokila
    kokila avatar
    2 posts
    Member since:
    Mar 2015

    Posted 17 Mar 2015 in reply to Cody Link to this post

    Yes, In that 9 mins video  at 02.25 mins the First Iteration Starts and when the first iteration goes I am typing "WOR" in the Diagnosis Type and the value Working is Selected From the dropdown Same is done in the field  which is after Duration field (ie.,Duration Type)
    Same steps when repeated for Second iteration (Starts at 03.57 mins)  in "Diagnosis Type" Control the value is not selected from the dropdown, as you said the mouse is  moved to position 0, 0. This happens till the last iteration.
           As you Suggested I tried Executing the test by including "ActiveBrowser.RefreshDomTree();" But the problem is not Solved.
  6. kokila
    kokila avatar
    2 posts
    Member since:
    Mar 2015

    Posted 17 Mar 2015 Link to this post

    Hello Cody,

             Thank You For your Reply.


    Regards,
    Kokila
  7. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 17 Mar 2015 Link to this post

    Hello Kokila,

    I see. Adding ActiveBrowser.RefreshDomTree() was only my first guess (and it was just a guess). My second guess is that somehow it's selecting the wrong element. I cannot determine if that is true or not just using our ticket system.

    Is there anyway I can connect directly to the application you are testing? I just need a publicly accessible URL I can enter into a browser. I will also need a copy of your test that I can execute on my machine.

    Once I can repro the problem then I can dig into and research what is the underlying cause and find the right solution.

    Let me know what is possible and we'll work from there.

    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!