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

Finding and Expanding a RadSlidingPane

2 Answers 53 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
LQKerry
Top achievements
Rank 1
LQKerry asked on 25 Jul 2013, 08:16 PM
Hello,

Hopefully a quick question or two regarding working with the RadSplitter/RadPane/RadSlidingZone/RadSlidingPane wrappers of the Testing Framework. From my MSTest script I am attempting to find the appropriate RadControl on the page that will allow me to expand the RadSlidingPane so that the content becomes visible. I have had no success. The following is a snippet of the source code (I believe it should be enough to show what I am working with):

<telerik:RadSplitter ID="RadSplitterActivityPage"
            runat="server"
            Width="100%"
            Height="100%"
            Orientation="Vertical">
            <telerik:RadPane ID="RadPaneFilter"
                runat="server"
                Width="20px">
                <telerik:RadSlidingZone ID="RadSlidingZoneFilter"
                    runat="server">
                    <telerik:RadSlidingPane ID="RadSlidingPageFilter"
                        runat="server"
                        Width="200px"
                        Title="Filter"
                        Scrolling="Y">
                        <telerik:RadAjaxPanel ID="RadAjaxPanelFilter"
                            runat="server"
                            Height="99%">
                            <div style="margin:5px;">
                                <label class="riLabel">Start Date:</label>
                                <br />
                                <telerik:RadDateTimePicker ID="RadDateTimePickerStartDate"
                                    runat="server"
                                    Width="100%">
                                </telerik:RadDateTimePicker>
                                <br />
                                <label class="riLabel">End Date:</label>
                                <br />
                                <telerik:RadDateTimePicker ID="RadDateTimePickerEndDate"
                                    runat="server"
                                    Width="100%">
                                </telerik:RadDateTimePicker>

Etc, etc, etc......

From the Testing Framework API I can see that RadPane and RadSlidingZone wrappers are the only two that have the "Expand" method. I have tried both with no success. So, I assume I am either not "finding" the appropriate element on the page, or in the case of the Expand method for the RadZlidingZone wrapper I am not providing the appropriate value for the "id" parameter.

Can anyone please provide me some guidance? Much appreciated in advance!

2 Answers, 1 is accepted

Sort by
0
LQKerry
Top achievements
Rank 1
answered on 26 Jul 2013, 02:15 PM
I am happy to say that I took a fresh look at this first thing this morning and I was able to figure this out. The following is the basis of how I got it to work:

private RadSlidingZone _filterSlidingZone;
private RadSlidingPane _filterPane;
 
//Filter Pane
HtmlFindExpression filterPaneExpr = new HtmlFindExpression("id=?RadSlidingPageFilter", "class=~rspSlidePane");
_browser.WaitForElement(filterPaneExpr, 20000, false);
_filterPane = _browser.Find.ByExpression<RadSlidingPane>(filterPaneExpr);
 
//Filter Sliding Zone
HtmlFindExpression filterSlidingZoneExpr = new HtmlFindExpression("id=?RadSlidingZoneFilter", "class=~rspSlideZone");
_browser.WaitForElement(filterSlidingZoneExpr, 20000, false);
_filterSlidingZone = _browser.Find.ByExpression<RadSlidingZone>(filterSlidingZoneExpr);
 
_filterSlidingZone.Expand(_filterPane.ID);
0
Velin Koychev
Telerik team
answered on 29 Jul 2013, 07:54 AM
Hello Kerry,

It is great to hear that you've been able to resolve this issue. Thank you for sharing with us your solution!

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