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

How do you use Watin to click the expand button on a RadSplitBar?

5 Answers 142 Views
Splitter
This is a migrated thread and some comments may be shown as answers.
chris
Top achievements
Rank 1
chris asked on 01 Jul 2009, 06:43 PM
I have a a couple of panes separated by a splitBar where the right hand pane is collapsed. I need to have my Watin test click the expand button so both panes are displayed. Here's the splitter definition:

 

<telerik:RadSplitter ID="rsCenterPaneSplitter" Runat="server" Width="100%"

 

 

Height="100%" Orientation="Vertical" VisibleDuringInit="False">

 

 

<telerik:RadPane ID="rpLeftItemPane" Runat="server" OnClientResized="ContentPaneResized" OnClientCollapsed="ContentPaneResized" OnClientExpanded="ContentPaneResized">

 

 

<iframe width="100%" height="100%" runat="server" id="fraContent"></iframe>

 

 

</telerik:RadPane>

 

 

<telerik:RadSplitBar ID="rsbSplitViewSplitBar" runat="server" CollapseMode="Both"

 

 

ResizeStep="50" EnableResize="true" />

 

 

<telerik:RadPane ID="rpRightItemPane" Runat="server" Collapsed="True" OnClientResized="ContentPaneResized" OnClientCollapsed="ContentPaneResized" OnClientExpanded="ContentPaneResized">

 

 

<iframe width="100%" height="100%" runat="server" id="fraRightItemContent"></iframe>

 

 

</telerik:RadPane>

 

 

</telerik:RadSplitter>

 



Thanks,
Chris

5 Answers, 1 is accepted

Sort by
0
Vyrban
Top achievements
Rank 1
answered on 02 Jul 2009, 08:15 AM
So, why don't click on the expand/collapse button on splittbar?
And what is you question in this case?
0
chris
Top achievements
Rank 1
answered on 02 Jul 2009, 03:46 PM
I've tried having Watin fire a number of events on the buttons (click, mouseup, mouseover then click, mouseover then mouseup etc.) but they don't appear to do anything. I saw a couple other forum responses from the telerik folks with code samples of how to make Watin tests manipulate telerik controls. I was hoping for something similar.
0
Petko
Telerik team
answered on 07 Jul 2009, 10:05 AM
Hi Chris,

Although we do not use WatiN internally, you should be able to expand/collapse the split bar triggering the OnMouseDown event.

We would suggest you our WebUI Test Studio instead. If you want to give it a try, a trial version of the product including sample tests is available for download from the client accounts here.

We also just announced a free test automation solution as well - WebAii Testing Framework, that allows you to write a single test and then have it executed against multiple browsers with no additional coding required.  A simple WebAii test demonstrating collapse/expand of RadRane follows:

using ArtOfTest.WebAii.Core; 
using Microsoft.VisualStudio.TestTools.UnitTesting; 
 
namespace Telerik.WebAii.Controls.Html.Tests.Splitter 
    [TestClass] 
    public class SplitterTests : RadControlsBaseTest 
    { 
        [TestMethod] 
        public void Expand_collapse() 
        { 
            Manager.LaunchNewBrowser(); 
            ActiveBrowser.NavigateTo("http://demos.telerik.com/aspnet-ajax/splitter/examples/collapseexpand/defaultcs.aspx"); 
 
            RadPane pane = Find.ById<RadPane>("LeftPane"); 
            pane.Collapse(); 
            pane.Expand(); 
        } 
    } 
 
 
Take a look at our Web Testing Tools home page as well .

Best wishes,
Petko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Lan
Top achievements
Rank 1
answered on 16 Nov 2011, 04:00 AM
Hi All,

I downloaded and installed the "01661Telerik.Testing.Framework.2011.2.1108.msi" but I can't find the "RadControlsBaseTest" and "RadPane" in the code and the API document. Could you please give me more details where I can find these class?

Thanks,
Lan
0
Plamen
Telerik team
answered on 17 Nov 2011, 07:15 PM
Hi Lan,

Here's a link to our new API Reference file:
http://dl.dropbox.com/u/49960471/Telerik%20Testing%20Framework%20API%20Reference.chm

It will be available on our website later this week or at the latest next week. The "RadPane" wrapper class shown in the sample is part of the Telerik.WebAii.Controls.Html namespace.  

The RadControlBaseTest class is a custom class and can be found in our Testing Framework samples(see screenshot). Just start the ASP .NET Ajax solution in VS and you will find it in the Solution Explorer(see screenshot).

Let me know if you have further questions on this!

Kind regards,
Plamen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Splitter
Asked by
chris
Top achievements
Rank 1
Answers by
Vyrban
Top achievements
Rank 1
chris
Top achievements
Rank 1
Petko
Telerik team
Lan
Top achievements
Rank 1
Plamen
Telerik team
Share this question
or