Telerik Forums
Testing Framework Forum
4 answers
215 views
I have been trying to get the WebAii Rad AJAX Control Wrapper to work for RadListView with limited success.  About to give up in frustration, I decided to run the sample application, the test for RadListView in the sample application failed on all test cases.

I am using Telerik WebAii Testing Framework 2010.1 (Version 101.4.12.0) and Telerik RadControls for ASP.NET AJAX Q1 2010 (10.1.3.9).

When my RadToolbar before the RadListView is visible, my finds seem to always fail.

        <telerik:RadAjaxPanel ID="AjaxPanel" 
                              runat="server" 
                              LoadingPanelID="AjaxLoadingPanel" 
                              ClientEvents-OnResponseEnd="ajaxResponseEnd" 
                              ClientEvents-OnRequestStart="ajaxRequestStart"
            <telerik:RadToolBar ID="SuperUser" 
                                runat="server" 
                                Width="100%" 
                                Visible="false"
                <Items> 
                    <telerik:RadToolBarDropDown Text="Information" 
                                                ID="InformationButton" 
                                                runat="server" 
                                                Visible="false"
                        <Buttons> 
                            <telerik:RadToolBarButton runat="server" 
                                                      ID="GpDatabase" 
                                                      Enabled="false" /> 
                                                       
                            <telerik:RadToolBarButton runat="server" 
                                                      ID="GpCompanyId" 
                                                      Enabled="false" /> 
                                                       
                            <telerik:RadToolBarButton runat="server" 
                                                      ID="TransFirstMode" 
                                                      Enabled="false" /> 
                                                       
                            <telerik:RadToolBarButton runat="server" 
                                                      ID="DatabaseServer" 
                                                      Enabled="false" /> 
                        </Buttons> 
                    </telerik:RadToolBarDropDown> 
                     
                    <telerik:RadToolBarButton ID="SalesRep" 
                                              runat="server" 
                                              Visible="false"
                        <ItemTemplate><img src="~/img/user_go.png" runat="server" style="vertical-align: middle;" /> Select Sales Rep: </ItemTemplate> 
                    </telerik:RadToolBarButton> 
                                                 
                    <telerik:RadToolBarButton ID="OriginalOwner" 
                                              runat="server" 
                                              Group="SalesReps" 
                                              CheckOnClick="true" 
                                              Checked="true" 
                                              ImageUrl="~/img/user_gray.png" 
                                              Visible="false" /> 
                     
                    <telerik:RadToolBarButton ID="CurrentRep" 
                                              runat="server" 
                                              Group="SalesReps" 
                                              CheckOnClick="true" 
                                              ImageUrl="~/img/user_edit.png" 
                                              Visible="false" /> 
                </Items> 
            </telerik:RadToolBar> 
            <telerik:RadListView ID="Projects" 
                                 runat="server" 
                                 ItemPlaceHolderID="ProjectHolder" 
                                 AllowPaging="true" 
                                 AllowCustomPaging="true" 
                                 PageSize="6"
                <LayoutTemplate> 
                    <div  class="RadListView RadListViewFloated RadListView_<%# Container.Skin %>"
                    <table style="margin: auto;" class="layout" cellspacing="0"
                        <tr> 
                            <td rowspan="5" style="background-repeat: repeat-y; background-image: url(img/border-left.png); background-position: right; width: 25px; padding: 0px;">&nbsp;</td> 
                            <td colspan="2"
                                <img src="img/ae_checkout.png" alt="Account Executive Checkout Logo" /> 
                            </td> 
                            <td rowspan="5" style="background-repeat: repeat-y; background-image: url(img/border-right.png); background-position: right; width: 25px; padding: 0px;">&nbsp;</td> 
                        </tr> 
                        <tr>                             
                            <td colspan="2"
                                <co:Navigator ID="QuickNavigator" runat="server" /> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td style="vertical-align: text-top;"
                                <asp:PlaceHolder ID="ProjectHolder" runat="server" /> 
                            </td> 
                            <td style="vertical-align: text-top; white-space: nowrap;"
                                <telerik:RadPanelBar ID="SalesItems" 
                                                     runat="server" 
                                                     Width="370px" 
                                                      
                                                     CssClass="invoice"
                                    <Items> 
                                        <telerik:RadPanelItem Text="Sales Items"
                                            <ItemTemplate> 
                                                <table cellpadding="0" cellspacing="0" style="width: 100%"
                                                    <tr> 
                                                        <td> 
                                                            <co:Invoice ID="SalesInvoice" runat="server" AllowRemoval="true" /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="background-color: #8EA3B9; padding-left: 5px;"
                                                            <telerik:RadNumericTextBox ID="Discount" 
                                                                                       runat="server" 
                                                                                       Type="Currency" 
                                                                                       Label="Discount: " 
                                                                                       Value="0" 
                                                                                       EnabledStyle-HorizontalAlign="Right" 
                                                                                        /> 
                                                            <asp:ImageButton ID="ApplyDiscountButton" 
                                                                             runat="server" 
                                                                             ImageUrl="~/img/arrow_refresh.png" 
                                                                             OnClick="ApplyDiscountButton_Click" /> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td style="text-align: right; background-color: #8EA3B9;"
                                                            <asp:Button ID="ClearButton" runat="server" Text="Clear" OnClick="ClearButton_Click"/> 
                                                            <asp:Button ID="EstimateButton" runat="server" Text="Create Quote" OnClick="CreateEstimateButton_Click" /> 
                                                            <asp:Button ID="BillMeButton" runat="server" Text="Bill Me" OnClick="BillMeButton_Click" /> 
                                                            <asp:Button ID="CheckOutButton" runat="server" Text="Pay Now" OnClick="CheckOutButton_Click" />                                                             
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelBar> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td style="vertical-align: text-top" colspan="2"
                                <telerik:RadDataPager ID="DataPager" 
                                                      runat="server" 
                                                      PageSize="6" 
                                                      PagedControlID="Projects"
                                    <Fields> 
                                        <telerik:RadDataPagerButtonField FieldType="FirstPrev" /> 
                                        <telerik:RadDataPagerButtonField FieldType="Numeric" /> 
                                        <telerik:RadDataPagerButtonField FieldType="NextLast" /> 
                                        <telerik:RadDataPagerPageSizeField PageSizeText="Projects per Page: " /> 
                                        <telerik:RadDataPagerGoToPageField CurrentPageText="Page: " TotalPageText="of" SubmitButtonText="Go" /> 
                                        <telerik:RadDataPagerTemplatePageField> 
                                        <PagerTemplate> 
                                            <div style="float: right"
                                                <b>Projects 
                                                    <asp:Label runat="server" ID="CurrentPageLabel" Text="<%# Container.Owner.StartRowIndex+1%>" /> 
                                                    to 
                                                    <asp:Label runat="server" ID="TotalPagesLabel" Text="<%# IIf(Container.Owner.StartRowIndex+Container.Owner.PageSize > Container.Owner.TotalRowCount, Container.Owner.TotalRowCount, Container.Owner.StartRowIndex+Container.Owner.PageSize) %>" /> 
                                                    of 
                                                    <asp:Label runat="server" ID="TotalItemsLabel" Text="<%# Container.Owner.TotalRowCount %>" /> 
                                                    <br /> 
                                                </b> 
                                            </div> 
                                        </PagerTemplate> 
                                    </telerik:RadDataPagerTemplatePageField> 
                                    </Fields> 
                                </telerik:RadDataPager>                                 
                            </td> 
                        </tr> 
                    </table>        
                    </div>  
                </LayoutTemplate> 
                <ItemTemplate> 
                    <asp:HiddenField ID="ProjectName" runat="server" Value='<%#Eval("ProjectAbbreviation") %>' /> 
                    <telerik:RadPanelBar ID="ProjectPanelBar" 
                                         runat="server" 
                                         Width="619px" 
                                         CssClass='<%#IIf(Eval("ProjectAbbreviation").ToString().Equals(Account.DefaultProject, StringComparison.CurrentCultureIgnoreCase), "highlightedProject projectHolder", "projectHolder") %>'
                        <Items> 
                            <telerik:RadPanelItem Text="Project Name" 
                                                  runat="server" 
                                                  ClickedCssClass="rpOut" 
                                                  ExpandedCssClass="rpOut" 
                                                  FocusedCssClass="rpOut" 
                                                  SelectedCssClass="rpOut"
                                <ItemTemplate>      
                                    <co:Project ID="Project" runat="server" />                     
                                </ItemTemplate> 
                            </telerik:RadPanelItem> 
                        </Items> 
                    </telerik:RadPanelBar> 
                     
                </ItemTemplate>                             
                <EmptyDataTemplate> 
                    <span style="width: 619px; text-align: center;"
                        <h1>No projects available for this account.</h1> 
                    </span> 
                </EmptyDataTemplate>                 
            </telerik:RadListView> 
        </telerik:RadAjaxPanel>   

Test Framework Code:
        Dim ajaxPanelPanel As HtmlDiv = Find.ById(Of HtmlDiv)("AjaxPanelPanel"
 
        Assert.IsNotNull(ajaxPanelPanel) 
 
        Dim ajaxPanel As HtmlDiv = Find.ById(Of HtmlDiv)("AjaxPanel"
 
        Assert.IsNotNull(ajaxPanel) 
 
        'Dim element_ As ArtOfTest.WebAii.ObjectModel.Element = ajaxPanel.Find.ById("Projects") 
        'Dim listView As RadListView = element_.As(Of RadListView)() 
        Dim listView As RadListView = ajaxPanel.Find.ByAttributes(Of RadListView)("class=RadListView RadListViewFloated RadListView_Default"

I can find the div and use an As(Of RadListView)(), but it throws an exception about the span should of been an input.  I recently upgraded to the latest version (above) to see if it would resolve some of these issues but no luck.
Konstantin Petkov
Telerik team
 answered on 27 Apr 2010
3 answers
464 views

Hi,

I am reposting this thread because it fails to open when I click on it, even though other threads open fine:


I am getting the following exception thrown:

ExecuteCommand failed!
InError set by the client. Client Error:
System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at mshtml.HTMLWindow2Class.IHTMLWindow2_get_location()
   at ArtOfTest.InternetExplorer.IECommandProcessor.SetCurrentDocumentMarkup(BrowserCommand& response)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessInformationCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_5b9018b6-a3c7-4783-b359-b959491b385e',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at mshtml.HTMLWindow2Class.IHTMLWindow2_get_location()
   at ArtOfTest.InternetExplorer.IECommandProcessor.SetCurrentDocumentMarkup(BrowserCommand& response)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessInformationCommands(BrowserCommand request)
   at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
InnerException: none.


Some other details from the command:
ActionType: ArtOfTest.WebAii.Messaging.Process.BrowserActionType.NotSet
CommandType: ArtOfTest.WebAii.Messaging.Process.BrowserCommandType.Information



The call stack when the exception is thrown shows that the framework is making 2 native code transitions, potentially the source of the memory corruption...?

ArtOfTest.WebAii.dll!ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(ArtOfTest.WebAii.Messaging.Process.BrowserCommand request = {BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_5b9018b6-a3c7-4783-b359-b959491b385e',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')}) + 0x352 bytes
  ArtOfTest.WebAii.dll!ArtOfTest.WebAii.Core.Browser.ExecuteCommand(ArtOfTest.WebAii.Messaging.Process.BrowserCommand request = {BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_5b9018b6-a3c7-4783-b359-b959491b385e',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')}, bool performDomRefresh = false, bool waitUntilReady = false) + 0x42 bytes
  ArtOfTest.WebAii.dll!ArtOfTest.WebAii.Core.Browser.RefreshDomTree() + 0x113 bytes
  ArtOfTest.WebAii.dll!ArtOfTest.WebAii.ObjectModel.Element.Refresh(bool forceDomTreeRefresh = true) + 0x33 bytes
  [Native to Managed Transition]
  [Managed to Native Transition]
  ArtOfTest.Common.dll!ArtOfTest.Common.WaitAsync.CallRefreshIfNeeded<ArtOfTest.WebAii.ObjectModel.Element>(ArtOfTest.WebAii.ObjectModel.Element target = {[Element: 'div:221' (id=ctl00_ctl00_Fcph_Mcph_portalBody_portalTabStrip)]}) + 0x261 bytes
  ArtOfTest.Common.dll!ArtOfTest.Common.WaitAsync._worker_DoWork<ArtOfTest.WebAii.ObjectModel.Element,object>(object waitParam = {ArtOfTest.Common.WaitAsync.WaitParams<ArtOfTest.WebAii.ObjectModel.Element,object>}) + 0x228 bytes
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(object state) + 0x2f bytes
  mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes
  [Native to Managed Transition]
  [Managed to Native Transition]
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x67 bytes
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x45 bytes
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading._ThreadPoolWaitCallback tpWaitCallBack) + 0x53 bytes
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(object state) + 0x59 bytes
  [Appdomain Transition]


Not sure what I can do about this?

Cheers,
Scott


Cody
Telerik team
 answered on 26 Apr 2010
1 answer
246 views
Hi guys!

I've got a problem with Browser.WaitUntilReady method with IE. It ends by time out very often (but not always). When I look on browser during test process it seems that IE window doesn't do anything.

What conditions does WaitUntilReady method depend on? What logic is behind it?

I'm using WebAii 1.1, IE 7, Windows XP Professional.


Thanks for your help!
Missing User
 answered on 23 Apr 2010
2 answers
150 views
What are the terms of use around this file? Since WebAii isn't allowed in the production code, we have a seperate project to use WebAii. But, this file needs to live inside production code... if this is allowed, could you please email me the licence?

If it's not allowed in production code, I'll just write my own logger. We need some kind of string communication between the javascript and C# unit tests. Our unit tests need a way to read return values that can't be implicitly read as strings.

edit: I mean WebAii_Logging.js (got C# on the brain)
Christopher
Telerik team
 answered on 23 Apr 2010
3 answers
137 views

Seems the server isn't accepting posts?
Atanas
Telerik team
 answered on 22 Apr 2010
2 answers
162 views
Hi
I like your Test studio alot, but Ive run into a problem in an advanced scenario.
I have a popup window where the user can upload images, but when the submit button is clicked I use jquery to refresh the parent window and close the popup window. During automated testing, however, this does not work.
I have attached the error message IE gives me.
I know this is kind of a special scenario, but do you know of any workaround?

jquery code: communication-between-browser-windows-with-jquery

 
// triggers an event in the parent window. Returns true if the  
// message was succesfully sent, otherwise false.  
$.triggerParentEvent = function(event, msg) { 
  $.triggerWindowEvent(window.opener, event, msg); 
}; 
 
// triggers an event in a window that was opened by the current window 
$.triggerWindowEvent = function(otherWindow, event, msg) { 
  if (typeof otherWindow == "object") { 
    form = otherWindow.document.forms["windowComm"]; 
    if (form) { 
      form.windowCommEvent.value = event; 
      form.windowCommData.value = msg; 
      form.windowCommButton.click(); 
      return true
    } 
  }  
  return false

Morten Røgenes
Top achievements
Rank 1
 answered on 21 Apr 2010
0 answers
136 views
Hi
I like your Test studio alot, but Ive run into a problem in an advanced scenario.
I have a popup window where the user can upload images, but when the submit button is clicked I use jquery to refresh the parent window and close the popup window. During automated testing, however, this does not work.
I have attached the error message IE gives me.
I know this is kind of a special scenario, but do you know of any workaround?

jquery code: communication-between-browser-windows-with-jquery
Morten Røgenes
Top achievements
Rank 1
 asked on 21 Apr 2010
4 answers
164 views

I have a SilverlightApp inside an iframe. I never had any trouble clicking on the items, but I recently added some content to the SilverlightApp's parent frame -- and now the clicks 'look' like they're off by that amount. Any ideas?

While I've got you here, I also had a ComboBox question. I found the only way to get comboBox.Items to contain the full list of items was to click on it. Are there any easier ways? Refresh didn't work...

int oldIndex = comboBox.SelectedIndex;  
 
// Populate the Combobox, just to make sure everything is up to date.  
comboBox.User.Click();  
comboBox.SelectedIndex = 1;  
comboBox.Refresh();  
comboBox.User.Click();  
 
if (oldIndex == -1)  
{  
  // -1 index no longer exists  
  oldIndex = 0;  
}  
 
for (int index = 0; index < comboBox.Items.Count(); ++index)  
{  
  ...  
Rob Lange
Top achievements
Rank 1
 answered on 20 Apr 2010
1 answer
247 views

Hi,

I'm getting this exception pretty regularly running my test :(

It doesn't happen every time, but enough to make the tests unreliable and, well, kinda counterproductive really.

Here is the callstack:

ArtOfTest.WebAii.dll!ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(ArtOfTest.WebAii.Messaging.Process.BrowserCommand request = {BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_0678d0ed-37cb-4923-a273-7529c9ca8061',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')}) + 0xe3 bytes
  ArtOfTest.WebAii.dll!ArtOfTest.WebAii.Core.Browser.ExecuteCommand(ArtOfTest.WebAii.Messaging.Process.BrowserCommand request = {BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_0678d0ed-37cb-4923-a273-7529c9ca8061',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'False',Response:'')}, bool performDomRefresh = false, bool waitUntilReady = false) + 0x42 bytes
  ArtOfTest.WebAii.dll!ArtOfTest.WebAii.Core.Browser.RefreshDomTree() + 0x113 bytes
  ArtOfTest.WebAii.dll!ArtOfTest.WebAii.ObjectModel.Element.Refresh(bool forceDomTreeRefresh = true) + 0x33 bytes
  [Native to Managed Transition]
  [Managed to Native Transition]
  ArtOfTest.Common.dll!ArtOfTest.Common.WaitAsync.CallRefreshIfNeeded<ArtOfTest.WebAii.ObjectModel.Element>(ArtOfTest.WebAii.ObjectModel.Element target = {[Element: 'div:213' (id=ctl00_ctl00_Fcph_Mcph_portalBody_portalTabStrip)]}) + 0x261 bytes
  ArtOfTest.Common.dll!ArtOfTest.Common.WaitAsync._worker_DoWork<ArtOfTest.WebAii.ObjectModel.Element,object>(object waitParam = {ArtOfTest.Common.WaitAsync.WaitParams<ArtOfTest.WebAii.ObjectModel.Element,object>}) + 0x228 bytes
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(object state) + 0x2f bytes
  mscorlib.dll!System.Threading.ExecutionContext.runTryCode(object userData) + 0x51 bytes
  [Native to Managed Transition]
  [Managed to Native Transition]
  mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x67 bytes
  mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state) + 0x45 bytes
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(System.Threading._ThreadPoolWaitCallback tpWaitCallBack) + 0x53 bytes
  mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(object state) + 0x59 bytes
  [Appdomain Transition]

You can see that it is transitioning into native code a couple of times, most likely where the memory corruption is coming from... 

Has anyone else seen this also? I am using the BETA so maybe I should upgrade. I hope it goes away, could be very nasty to track down...

Thanks!
Scott

Cody
Telerik team
 answered on 20 Apr 2010
14 answers
294 views
Hi

With the new merger, what is the status of the previous free WebAii Automation Library.  Will that still be available for free or do we now need to purchase it as part of a WebUI Test Studio Edition?  I'm not referring to the screen recorder, only to the automation library.

Thanks
Ivo
Telerik team
 answered on 20 Apr 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?