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

[Solved] Problem with RadTabItem selection

12 Answers 93 Views
Silverlight WebAii RadControls
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Maadhavi
Top achievements
Rank 1
Maadhavi asked on 07 Oct 2009, 08:43 PM
Hi,

I am having problem selecting RadTabItem while automating. The following is my code

RadTabItem dataTab= tabControl.TabItems[2];

            dataTab.Select();

            Assert.IsTrue(dataTab.IsSelected,"My tab is selected");

While debugging i could see that "dataTab" variable is populated with the correct value but it wont select the tab and my assertion is failing. Any help on this is highly appreciated.

Thank you for your time.

Regards,

Maadhavi 

12 Answers, 1 is accepted

Sort by
0
Konstantin Petkov
Telerik team
answered on 08 Oct 2009, 07:46 AM
Hello Maadhavi,

The Select() method has fairly simple implementation and the IsSelected property simply gets the value from the real RadTabItem.IsSelected property. As alternative you can also try the TabControl.SelectedIndex property.

We actually distribute a similar test as part of our sample tests, can you run is as well? You can find it at the SampleTests project under Navigation/TabControlTests namely TabSelectionTest. Does it work on your end? It passes successfully here running the Q3 Beta live TabControl demo.

So my best guess for this failure is an older version of RadControls for Silverlight where the TabControl returns the wrong IsSelected value. Can you please share which controls version has your application under test built with?

Hope this helps.

Sincerely yours,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maadhavi
Top achievements
Rank 1
answered on 08 Oct 2009, 03:23 PM
Hi Konstantin,

TabSelectionTest doesnot work at my end. While debugging it fails at "compInfoItem.Select()". The IsSelected property on this RadTabItem stays false and the following assertion fails.

Assert.AreEqual<int>(1, tabControl.SelectedIndex, "Tab control selected index on another tab click verification failed!");


Is there something i am missing?

Thank you for you quick response. I appreciate it.

Regards,
Maadhavi

0
Maadhavi
Top achievements
Rank 1
answered on 08 Oct 2009, 03:24 PM
Hi Konstantin,

TabSelectionTest doesnot work at my end. While debugging it fails at "compInfoItem.Select()". The IsSelected property on this RadTabItem stays false and the following assertion fails.

Assert.AreEqual<int>(1, tabControl.SelectedIndex, "Tab control selected index on another tab click verification failed!");


Is there something i am missing?

Thank you for you quick response. I appreciate it.

Regards,
Maadhavi

0
Maadhavi
Top achievements
Rank 1
answered on 08 Oct 2009, 03:24 PM
Hi Konstantin,

TabSelectionTest doesnot work at my end. While debugging it fails at "compInfoItem.Select()". The IsSelected property on this RadTabItem stays false and the following assertion fails.

Assert.AreEqual<int>(1, tabControl.SelectedIndex, "Tab control selected index on another tab click verification failed!");


Is there something i am missing?

Thank you for you quick response. I appreciate it.

Regards,
Maadhavi

0
Konstantin Petkov
Telerik team
answered on 08 Oct 2009, 03:38 PM
Hello Maadhavi,

By "TabSelectionTest doesnot work at my end." do you mean it fails against the live demos on demos.telerik.com/silverlight/beta or do you run it against your Silverlight application?

I see a possible failure in a scenario when our RadTabControl is extended. Can you please check whether this is your case?

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maadhavi
Top achievements
Rank 1
answered on 08 Oct 2009, 04:23 PM
Hi Konstantin,

Sorry i didn't mean to post so many times, there was a server error i ended up submitting few times :). It fails against the live demos on demos.telerik.com/silverlight/beta.

Thank you for quick response.

Regards,
Maadhavi
0
Konstantin Petkov
Telerik team
answered on 09 Oct 2009, 05:22 AM
Hi Maadhavi,

OK, that could be because of an older version of the framework you have. Our records show you have downloaded the 826 build and we released an update that is compatible with the Beta of RadControls for Silverlight. You didn't mention which version of RadControls for Silverlight you run, though.

Could you please try a pure framework Click action on the tab item. Something like
dataTab.User.Click()

instead of the .Select() call? If that works additionally you may need to call tabControl.Refresh(), at least that's what the Select method is doing.

If that doesn't help though, I will need to reproduce the problem in order to help you further. If there is a live site with the application or you can submit a project holding a stripped down version as well as another with the failing test, I will gladly look into them. Feel free to submit a support ticket to send them through.

Best wishes,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maadhavi
Top achievements
Rank 1
answered on 09 Oct 2009, 03:33 PM
Hi Konstantin ,

I will try the things you have suggested and get back to you. Our application prototype uses Q2 Radcontrols but for the real website they are using Q3 Radcontrols.

Thank you for your immediate response.

Regards,
Madhavi
0
Maadhavi
Top achievements
Rank 1
answered on 09 Oct 2009, 06:12 PM
Hi Konstantin,

I uninstalled the older version and installed the latest version(2009.2.1006(Oct 6, 2009))  of WebAii Testing Framework from telerik site and i still have the same problem while running XamlSampleTests TabControlTests() against the live demos on demos.telerik.com/silverlight/beta. It fails exactly at the same point as it happened with the older version

compInfoItem.Select()

Assert.AreEqual<int>(1, tabControl.SelectedIndex, "Tab control selected index on another tab click verification failed!");

While debugging found out that IsSelected() property on the RadTabItem is false as was the case with the earlier version.

Since you said it would work only with Q3 Radcontrols i did not try on my application prototype as it uses Q2 Radcontrols. As i mentioned earlier we are using Q3 radcontrols for development of our real application and i am looking forward in using your framework for automated tests.

Thank you for your time.

Regards,

Maadhavi



0
Konstantin Petkov
Telerik team
answered on 09 Oct 2009, 07:32 PM
Hi Maadhavi,

We will definitely need more information since this issue get stranger and stranger.

Although the IsSelected fails does the test perform successfully the tab selection, i.e. do you see the new tab selected? Also does the failure happen on IE, Firefox or both?

Can you also share the exact OS you run on your end? Have you tried installing the latest framework on a different machine and running the same test there as well?

Any information you can share could be of help.

Greetings,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Maadhavi
Top achievements
Rank 1
answered on 12 Oct 2009, 07:30 PM
Hi Konstantin,

When i use  Firefox 3.5.3 the XamlSampleTests TabControlTests() passes sometimes and fails sometimes but in IE 7 it always fails.
Do i need to configure any proxy settings to run the tests? . I use Microsoft Windows XP Professional version 2002 Service Pack 2 and have everything latest downloaded from telerik. Also i am using Visual studio 2008 Professional Edition to run the tests. Kindly let me know if i am missing something.

Regards,
Maadhavi
 





0
Konstantin Petkov
Telerik team
answered on 14 Oct 2009, 08:12 AM
Hi Maadhavi,

You can check whether the system has pending updates just in case. Also, were you able to reproduce the problems on another machine?

As to the browsers, since any WebAii tests run there, they seem to be configured as necessary.

Although our attempts to reproduce the described behavior completely fail so far, we will keep trying on other machines. In the meantime should you notice anything else specific to your environment or manage to run the tests after some interaction (Windows update, whatever) please share it. Thank you!

All the best,
Konstantin Petkov
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Silverlight WebAii RadControls
Asked by
Maadhavi
Top achievements
Rank 1
Answers by
Konstantin Petkov
Telerik team
Maadhavi
Top achievements
Rank 1
Share this question
or