//Get the data grid.
SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
DataGrid grid = app.Find.ByAutomationId<DataGrid>("RelatedCommentsDataGrid");
int r = grid.Rows.Count;
List<string> list = new List<string>();
//Place the TextBlock content of the comment subject cell from each row into the string list.
for (int i = 0; i < r; i++)
{
DataGridRow row = grid.Rows[i];
DataGridCell cell = row.Cells[2];
list.Add(cell.TextBlockContent);
Log.WriteLine(cell.TextBlockContent);
}
//Get the created comment subject
object createdComment = GetExtractedValue("CommentSubject");
//Compare the created comment subject to the list and determine if it created successfully.
for (int j = 0; j < list.Count; j++)
{
if (j+1 == list.Count)
{
break;
}
else
{
if (createdComment.Equals(list[j])){
Log.WriteLine(createdComment+"is created successfully");
}
else{
Log.WriteLine(createdComment+"fails to created" );
}
}
}
<?xml version="1.0" encoding="iso-8859-1"?><event><item><title>PROD-1464</title><date>Thursday, April 26, 2012</date><time /><enddate>Saturday, May 26, 2012</enddate><description /><location>Centerville Room 5</location><library>Centerville Library</library><link></link></item><item><title>Ongoing Event</title><date>Wednesday, May 09, 2012</date><time /><enddate>Thursday, May 31, 2012</enddate><description /><location>Centerville Room 5</location><library>Centerville Library</library><link></link></item><item><title>Automation Weekly Recurring Event</title><date>Tuesday, May 15, 2012</date><time>1:00 PM</time><enddate /><description /><location>Centerville Room 4</location><library>Centerville Library</library><link></link></item></event>
Target '[Element: 'iframe:0'' is not a supported element to set text to. at ArtOfTest.WebAii.Core.Actions.SetText(Element targetElement, String text) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.SetTextActionDescriptor.Execute(Browser browser) at ArtOfTest.WebAii.Design.Extensibility.HtmlActionDescriptor.Execute(IAutomationHost autoHost) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
What could be the reason?