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

Excel Iteration Binding

6 Answers 59 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.
kokila
Top achievements
Rank 1
kokila asked on 12 Mar 2015, 09:27 AM
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,

6 Answers, 1 is accepted

Sort by
0
Cody
Telerik team
answered on 13 Mar 2015, 06:19 PM
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
 
0
kokila
Top achievements
Rank 1
answered on 14 Mar 2015, 11:54 AM
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

0
Cody
Telerik team
answered on 16 Mar 2015, 08:15 PM
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
 
0
kokila
Top achievements
Rank 1
answered on 17 Mar 2015, 07:14 AM
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.
0
kokila
Top achievements
Rank 1
answered on 17 Mar 2015, 07:19 AM
Hello Cody,

         Thank You For your Reply.


Regards,
Kokila
0
Cody
Telerik team
answered on 17 Mar 2015, 04:53 PM
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
 
Tags
General Discussions
Asked by
kokila
Top achievements
Rank 1
Answers by
Cody
Telerik team
kokila
Top achievements
Rank 1
kokila
Top achievements
Rank 1
Share this question
or