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

Element is not identified when the MS test data driven values is picking up on execution

1 Answer 234 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vedha
Top achievements
Rank 1
Vedha asked on 12 Oct 2020, 08:28 AM

Hi

Below is the code to iendify a Kendo Input control and enter the text.

 

 public Kendoinput Span
        {
            get
            {
                //return driver.ActiveBrowser.Find.ByAttributes<KendoInput>("class=~k-widget", "class=~k-autocomplete", "class=~txtBusinessIndustry", "GroupIndex=0");
               
            }
        }

It works perfectly when I execute it with first row of MS Test Data driven with CSV.

When the second row is started to execute, the element is not identified and no error message is displayed.

Any one, please help on this. 

 

Thanks,

Vedha

 

1 Answer, 1 is accepted

Sort by
0
Plamen Mitrev
Telerik team
answered on 13 Oct 2020, 01:44 PM

Hi Vedha,

Thank you for sharing your code and details about the behavior. It seems to me that something in the DOM tree is changing with each iteration. I have some ideas that you can try and explore on your end. 

  • The find expression by element's attributes uses GroupIndex, which could be causing some troubles. For example, if the DOM tree structure of the application under test is changed, Test Studio might locate the wrong item for your test scenario. I would advise you to avoid using TagIndex and GroupIndex in your find expressions and try using something unique, like "id" or "textContent".
  • Check the DOM tree at the time of the second iteration and ensure that the used find expression actually locates the expected element.
  • Try to refresh the DOM tree that Test Studio uses, before calling the code that is causing troubles. That way, you will ensure that the search for the target element will be executed against the current DOM tree.

I hope the above suggestions will help you troubleshoot this issue and find a suitable solution. In case the troubles continue, please share your a working project that reproduces this behavior and access to the application under test. I will explore it and try to advise you further.

Regards,
Plamen Mitrev
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
General Discussions
Asked by
Vedha
Top achievements
Rank 1
Answers by
Plamen Mitrev
Telerik team
Share this question
or