foreach(Telerik.WebAii.Controls.Xaml.RadComboBoxItem item in Pages.Tiger.SilverlightApp.TaxCodeComboBoxRadcombobox.Items)
{
if (item.Content.ToString().Equals(textToFind))
{
found = true;
break;
}
}
Assert.IsTrue(found);
But when execution, I got the following error:
Exception thrown executing coded step: '[test] : test'.InnerException:ArtOfTest.Common.Exceptions.AssertException: Assert.IsTrue - [Expected:True],[Actual:False] at ArtOfTest.Common.UnitTesting.Assert.IsTrue(Boolean condition, String message) at ArtOfTest.Common.UnitTesting.Assert.IsTrue(Boolean condition)
Am I missing something? It doesn't seem to correctly identify the items of the combo box.
I edited TaxComboBoxRadComboBox in such a way automationid = TaxCodeComboBox, but I am still getting the same error
I can show to you how I create the script through SharedView
Regards,
Jan Mark
Hi,
I have the following RadGrid as shown in the code snippet. Inside a Unit Test code using ArtOfTest.WebAii.TestTemplates etc. library in C#, I am trying to get to the EditColumn ImageButton and mimic a click on the image to initiate a 'edit item' operation.
I have the grid using (RadGrid grid = Find.ById<RadGrid>("RadGrid1");).
How do I get to the HtmlImageButton or equivalent object for a specific row in the MasterTable?
I would greatly appreciate any pointers.
<
telerik:RadGrid
ID
=
"RadGrid1"
runat
=
"server"
AllowSorting
=
"True"
PageSize
=
"5"
AllowPaging
=
"True"
OnItemCreated
=
"RadGrid1_ItemCreated"
OnColumnCreated
=
"RadGrid1_ColumnCreated"
OnNeedDataSource
=
"RadGrid1_NeedDataSource"
OnItemCommand
=
"RadGrid1_ItemCommand"
OnItemDataBound
=
"RadGrid1_ItemDataBound"
OnUpdateCommand
=
"RadGrid1_UpdateCommand"
OnDeleteCommand
=
"RadGrid1_DeleteCommand"
>
<
PagerStyle
Mode
=
"NextPrevAndNumeric"
></
PagerStyle
>
<
MasterTableView
DataKeyNames
=
"ID"
CommandItemDisplay
=
"Top"
AutoGenerateColumns
=
"false"
ShowHeadersWhenNoRecords
=
"true"
>
<
CommandItemTemplate
>
<
div
style
=
"padding: 5px 5px;"
>
<
asp:LinkButton
ID
=
"btnRebind"
runat
=
"server"
CommandName
=
"RebindGrid"
><
img
style
=
"border:0px;vertical-align:middle;"
alt
=
""
src
=
"Images/Refresh.gif"
/>Refresh</
asp:LinkButton
>
</
div
>
</
CommandItemTemplate
>
<
Columns
>
<
telerik:GridButtonColumn
UniqueName
=
"InsertColumn"
ButtonType
=
"ImageButton"
CommandName
=
"AddItem"
ImageUrl
=
"~/Images/AddRecord.gif"
HeaderStyle-Width
=
"20px"
HeaderText
=
"Create New Item"
/>
<
telerik:GridButtonColumn
UniqueName
=
"EditColumn"
ButtonType
=
"ImageButton"
CommandName
=
"EditItem"
HeaderStyle-Width
=
"20px"
HeaderText
=
"Edit/View Item"
/>
<
telerik:GridBoundColumn
DataField
=
"ID"
Visible
=
"false"
/>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"true"
/>
</
ClientSettings
>
</
telerik:RadGrid
>