Hi,
I am trying to automate a web application using Coded UI 2012. However Actions are not performed during playback and hand coding approach.
Does Coded UI 2012 SP2 Support Telerik controls designed with ASP.NET Application.
Details:
Silverlight Version - 1.2,
DLL Name - Telerik.Web.UI,
Runtime Version - v2.0.50727,
DLL Version - 2011.1.413.35
Warning: A problem with WMI has caused an error in the recording. To correct this, verify that WMI services are running and that you have access permissions to WMI. The WMI repository might also be corrupted. For more information, see "WMI Troubleshooting Techniques" (http://go.microsoft.com/fwlink/?LinkID=229846)
Error: Microsoft.VisualStudio.TestTools.UITest.Extension.FailedToPerformActionOnHiddenControlException' occurred in Microsoft.VisualStudio.TestTools.UITesting.dll but was not handled in user code
Please help me out.
Thanks ,
Raji
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="rttm.aspx.vb" Inherits="rttm" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form1" runat="server"> <div> <telerik:RadScriptManager runat="server" ID="mgrJS" AsyncPostBackTimeout="600"> </telerik:RadScriptManager> <telerik:RadGrid runat="server" ID="rg" AutoGenerateColumns="False" Width="620px" Skin="Web20"> <MasterTableView HierarchyLoadMode="ServerOnDemand" Width="620px" TableLayout="Auto" DataKeyNames="ID"> <Columns> <telerik:GridBoundColumn HeaderText="ID" UniqueName="ID" DataField="ID"> </telerik:GridBoundColumn> <telerik:GridImageColumn UniqueName="View" ImageUrl="App_Themes/BlueBT2009/Images/Inq.gif"></telerik:GridImageColumn> </Columns> </MasterTableView> <FilterMenu EnableImageSprites="False"> </FilterMenu> </telerik:RadGrid> <telerik:RadToolTipManager ID="RadToolTipManager1" OffsetY="-1" HideEvent="Default" Width="800px" Height="600px" runat="server" EnableShadow="true" RelativeTo="BrowserWindow" Position="Center" OnAjaxUpdate="Load_ToolTip" Modal="false" ContentScrolling="Auto" AutoCloseDelay="0" ShowEvent="OnClick" > </telerik:RadToolTipManager> </div> </form> </body> </html>Partial Class rttm Inherits System.Web.UI.Page Protected Sub rg_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rg.ItemDataBound If e.Item.ItemType = GridItemType.Item OrElse e.Item.ItemType = GridItemType.AlternatingItem Then Me.RadToolTipManager1.TargetControls.Add(TryCast(e.Item, GridDataItem)("View").ClientID, TryCast(e.Item, GridDataItem)("ID").Text, True) End If End Sub Protected Sub rg_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rg.NeedDataSource Dim dt As New DataTable() Dim col As New DataColumn("ID") dt.Columns.Add(col) Dim row As DataRow = dt.NewRow row(0) = 1 dt.Rows.Add(row) row = dt.NewRow row(0) = 2 dt.Rows.Add(row) row = dt.NewRow row(0) = 3 dt.Rows.Add(row) Me.rg.DataSource = dt Session("rttm") = dt End Sub Protected Sub Load_ToolTip(ByVal sender As Object, ByVal args As ToolTipUpdateEventArgs) Dim invoiceDetails() As String = args.Value.Split("_") Dim toAdd As UserControl = LoadUserControl("rttmdetails.ascx", invoiceDetails) args.UpdatePanel.ContentTemplateContainer.Controls.Add(toAdd) args.UpdatePanel.Update() End Sub Private Function LoadUserControl(ByVal UserControlPath As String, ByVal ParamArray constructorParameters As Object()) As UserControl Dim constParamTypes As New List(Of Type)() For Each constParam As Object In constructorParameters constParamTypes.Add(constParam.[GetType]()) Next Dim ctl As UserControl = TryCast(Page.LoadControl(UserControlPath), UserControl) Dim constructor As System.Reflection.ConstructorInfo = ctl.[GetType]().BaseType.GetConstructor(constParamTypes.ToArray()) If constructor Is Nothing Then Throw New MemberAccessException("The requested constructor was not found on : " & ctl.[GetType]().BaseType.ToString()) Elseconstructor.Invoke(ctl, constructorParameters) End If Return ctl End FunctionEnd Class<%@ Control Language="VB" AutoEventWireup="false" CodeFile="rttmDetails.ascx.vb" Inherits="rttmDetails" %> <telerik:RadGrid ID="rg" runat="server" AutoGenerateColumns="false" Skin="Web20" AllowMultiRowSelection="true"> <MasterTableView Name="details" DataKeyNames="ID"> <Columns> <telerik:GridBoundColumn HeaderText="ID" UniqueName="ID" DataField="ID"> </telerik:GridBoundColumn> </Columns> </MasterTableView> </telerik:RadGrid>Partial Class rttmDetails Inherits System.Web.UI.UserControl Private _id As String Public Property Identity() As String Get Return (_id) End Get Set(ByVal value As String) _id = value End Set End Property Private _details As DataRow() ReadOnly Property Details() As DataRow() Get Return _details End Get End Property Public Sub New() End Sub Public Sub New(ByVal id As String) Dim dt As DataTable = CType(Session("rttm"), DataTable) _id = id _details = dt.Select("ID=" & id) End Sub Protected Sub rgInvoice_NeedDataSource(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rg.NeedDataSource Me.rg.DataSource = Details End SubEnd Class.RadMenu .rmRootGroup .rmSelected:after{ content: ""; position: absolute; top: 0px; left: 40px; border-right: 15px solid red; border-top: 15px solid transparent; border-bottom: 15px solid transparent;}<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server"> <script type="text/javascript"> function MenuOpenWindow(windowTitle) { var oWindow; var offsetElementBounds; var menu = $find("<%=menuEmp.ClientID%>"); var menuItem = menu.findItemByValue(windowTitle).get_element(); //Closes the last window opened if (lastOpenedWindow) { lastOpenedWindow.close(); lastOpenedWindow = null; } if (windowTitle == "EmpProj") { if (lastWindowTitle != "EmpProj") { oWindow = $find("<%=winEmpProj.ClientID%>"); oWindow.show(); if (oWindow.get_offsetElementID()) { offsetElementBounds = $telerik.getBounds($get(oWindow.get_offsetElementID())); var x = offsetElementBounds.x + (menuItem.offsetWidth / 3); var y = menuItem.offsetTop + offsetElementBounds.y - (menuItem.offsetHeight / 3); oWindow.moveTo(x, y); } lastOpenedWindow = oWindow; lastWindowTitle = "EmpProj"; return false; } else { menuItem.set_selected(false); lastWindowTitle = null; } } } </script></telerik:RadScriptBlock>if (lastWindowTitle != "EmpProj")' else statement, I have the menuItem.set_selected(false);. According to http://www.telerik.com/help/aspnet-ajax/menu-radmenuitem-client-side.html, that should work, but I'm getting an error: