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

Unable to get Kendo grid object with testing framework

2 Answers 102 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Wenwen
Top achievements
Rank 1
Wenwen asked on 16 Jul 2013, 12:10 AM
Hey, telerik

Our web UI  includes quite a few of Kendo UI widgets, such as grid, calendar. So we are currently using telerik testing framework to automate UI testing in C# with NUnit. 

However, I got null grid object with the following line of code

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

And in web :

<div id="grid" class="k-grid k-widget" data-role="grid" style="">
<div class="k-grid-header" style="padding-right: 18px;">
<div class="k-grid-header-wrap">
<table role="grid">
</div>
</div>
<div class="k-grid-content" data-role="virtualscrollable" style="width: auto; overflow: hidden; padding-right: 18px;">
<div class="k-virtual-scrollable-wrap">
<table role="grid">
<colgroup>
<tbody>
<tr class="" role="row" data-uid="6d286177-6c1e-48c0-b441-32c2e5021568">
<tr class="k-alt" role="row" data-uid="390c1c37-29cf-4540-8a4e-47596ac03077">
<tr role="row" data-uid="a9f0717c-2a82-486c-8aae-ff95ecf08b05" class="">
<tr class="k-alt" role="row" data-uid="9eaabfaa-355f-4322-9168-4c1e9183fbd8">
<tr role="row" data-uid="6ffc4156-c51d-406a-afb0-d2208c0cff1c" class="">
<tr class="k-alt" role="row" data-uid="80762974-ca42-4f00-b15a-10e5f646e28c">
<tr role="row" data-uid="2d6bdb48-dbb4-4b15-a079-8bbe28714d0e" class="">
<tr class="k-alt" role="row" data-uid="5cbdc03a-6100-491e-8df7-5bb72fc39066">
<tr role="row" data-uid="2a0fa3b8-cf2c-484c-9506-25adff86ea34" class="">
<tr class="k-alt" role="row" data-uid="fd59824b-0797-4e46-a528-4609b4504afa">
<tr role="row" data-uid="bbd92f33-d609-4a00-8823-ec2193e77cd1" class="">
<tr class="k-alt" role="row" data-uid="7aaa1d32-83ad-4bfa-a37e-e33c40baf013">
<tr role="row" data-uid="ca4c5951-46b3-4e6d-b9e5-789935e694ea" class="">
<tr class="k-alt" role="row" data-uid="7527b911-4aa4-4b24-92aa-617bd6069036">
<tr role="row" data-uid="16f4633d-fd4f-4652-a30c-72b8783ad660" class="">
</tbody>
</table>
</div>
<div class="k-scrollbar k-scrollbar-vertical" style="width: 18px;">
</div>
</div>

Could you let me know where I did wrong?

Thanks,

2 Answers, 1 is accepted

Sort by
0
Wenwen
Top achievements
Rank 1
answered on 16 Jul 2013, 05:07 PM
I guess "myManager.ActiveBrowser.RefreshDomTree();" would make it work.

BTW, where I can find more sample codes about Kendo UI widget automation, such as grid? 

Thanks,

0
Boyan Boev
Telerik team
answered on 17 Jul 2013, 06:31 AM
Hi Wenwen,

I am glad to hear you have resolved the issue.

Refreshing the DOM tree is a common action which helps the DOM to load properly.

Unfortunately we don't have code samples about Kendo, however if you have issues with it do not hesitate to contact us.

Thank you for your understanding. 

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