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

KendoDataGrid is not identified by telerik testing framework

3 Answers 122 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vedha
Top achievements
Rank 1
Vedha asked on 23 Jan 2020, 09:53 AM

I have the webpage with kendoGrid with attached sourcecode

I can not able to identify the cell with the below code. 

 KendoGridDataCell element = driver.ActiveBrowser.Find.ByExpression<KendoGridDataCell>("class=~k-widget", "class=~k-grid", "GroupIndex=0", "|", "TagIndex=td:0", "Tagname=td");

Can anyone help on this.? Thanks

3 Answers, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 24 Jan 2020, 02:11 PM

Hello Vedha,

I analyzed the find expression and it seems to be targeting the first <td> element in the kendoGrid. However, I am not familiar with the application under test and I can't say for sure what is happening during test execution. Please gather the full DOM tree of the page, along with details about the test execution and the behavior of the test. You can zip and attach those in this thread and I will analyze them further.

Another option to troubleshoot this issue, is to test against a sample page that is publicly accessible for you and me - like this one. Try to automate a sample scenario and share that project with your next reply.

I am looking forward to hearing from you.

Regards,
Plamen Mitrev
Progress Telerik

 
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
 
0
Vedha
Top achievements
Rank 1
answered on 29 Jan 2020, 09:46 AM

Hi Plaman,

Please find the source code element as below

 

 

0
Plamen Mitrev
Telerik team
answered on 29 Jan 2020, 12:51 PM

Hi Vedha,

Based on the screenshot of the section of the DOM tree, I have some thoughts and suggestions for your. Lets break down the find expression into pieces and analyze it.

You are using chained find expression to locate the target element, where:

- the first part looks for an element, which contains "k-widget" and "k-grid" in its "class" attribute and also has a "GroupIndex" equal to "0";
- the second part looks for a child element that "Tagname" equal to "td" and and index of "0".

The <div> that is expanded seems to cover the requirements for attribute "class", but is missing the "GroupIndex". You can try and replace the "GroupIndex" with "Tagname" equal to "div" and see if that will fix the issue. Please keep in mind that you the chained find expression will take the first element that matches the filters in each of its parts. So, make sure that the first part matches the correct <div> and the second part - the correct <td>.

I hope that will help you adjust the find expression and automate this test scenario. If you continue to experience any troubles, share the full DOM tree as text file (you can zip it and then attach it here) and the updated find expression.

Regards,
Plamen Mitrev
Progress Telerik

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