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
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.
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
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
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
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.
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
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.
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
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
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.
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
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.