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

Random error while accessing ArtOfTest.WebAii.Silverlight.UI.TabControl.TabItems

3 Answers 68 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Carlos Marcão
Top achievements
Rank 2
Carlos Marcão asked on 25 Aug 2010, 03:45 PM
Hello.

I use ArtOfTest.WebAii.Silverlight.UI.TabControl and it works fine almost all times but randomly I get the following error:

Test method AutomatedTests.SystemTests.BuildVerificationTests.SupervisorTestCases.HomePagesInsertTwoPages threw exception:  System.ArgumentException: Unable to find the tab item container. For custom TabControl temlpate please override the .TabItemContainer property..

Is it something that I'm doing wrong? 

I've got the reference to control in the following way:

//_homePagesControl it's a container
TabControl _tabControl = _homePagesControl.Find.ByName<TabControl>(TAB_CONTROL_NAME);
_tabControl.Wait.ForExists(3000); //I don't know the timeout unit... Reference documentation has no information about that... I guess it's milliseconds

Many thanks,

Carlos Marcão

3 Answers, 1 is accepted

Sort by
0
Accepted
Konstantin Petkov
Telerik team
answered on 25 Aug 2010, 04:03 PM
Hi Carlos,

The error is currently thrown looking for the .TabItems property or calling the SelectTab() method which I cannot find in your code. Can you post the complete test please?

I suppose you will need to wait until the TabControl appears after some update action, is that the case? If that's an animation in Silverlight you may need to find which element gets updated and call it's Refresh() method to update the visual tree below. Then you can try to find the TabControl in there. For handling animations in Silverlight we also recommend using the .Wait.ForNoMotion() method on FrameworkElement and any other element deriving from it.

P.S. Yes, the timeout units throughout the framework are milliseconds.

Sincerely yours,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Carlos Marcão
Top achievements
Rank 2
answered on 25 Aug 2010, 04:13 PM
Thanks for your answer.

You are right, I've just call TabItems.Count.
Before call this method I added a new Tab in tab control. In this case I must call Refresh or Wait.ForMotion()?

Thanks,

Carlos Marcão
0
Konstantin Petkov
Telerik team
answered on 25 Aug 2010, 04:19 PM
Hi Carlos,

Just a TabControl.Refresh() call will be sufficient.

Regards,
Konstantin Petkov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
General Discussions
Asked by
Carlos Marcão
Top achievements
Rank 2
Answers by
Konstantin Petkov
Telerik team
Carlos Marcão
Top achievements
Rank 2
Share this question
or