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

Can not find children

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Ha
Top achievements
Rank 1
Ha asked on 03 Aug 2012, 04:19 AM
Hi
On IE9 browser
I find by element  but it is not success.
(It succeed on firefox)
allrow = 0
Please refer attachment
****
Element containerElment = Find.ById("tblFunction");
            if(containerElment == null) throw new Exception("Can't find tblFunction");        
            
            Element tBodyContainer = containerElment.Children[0];
            Log.WriteLine("tBodyContainer : " + tBodyContainer.ToString());
            
            List<Element> allRow = tBodyContainer.Children.ToList(); // All TR items
            Log.WriteLine("All rows count : " +allRow.Count);
           

1 Answer, 1 is accepted

Sort by
0
Stoich
Telerik team
answered on 08 Aug 2012, 05:01 PM
Hello,
I tried to recreate the approach you're using to access all the rows in the table. I used code that's very similar to yours against the following page:
http://www.w3schools.com/tags/tryit.asp?filename=tryhtml_tbody

My test had consistent behavior in IE and FF. This leads me to think that the general approach you've chosen should work. However, there's some minor different in the way the DOM structure of the app looks under the different browsers. This is likely what's causing the problem.

Unfortunately, the information you've provided is not enough for me to be able to determine what the exact issue is. Please go ahead and give me some additional information so that I may further assist you in the troubleshooting process.

By far the best thing would be for you to grant us direct access to your application. That way I can run your code against your app and determine where it's failing easily and reliably.

As a paying customer you're entitled to access to your support system. You can log a support ticket on this and give us the request info there. Unlike a forum post - support tickets are completely confidential.

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