Hi
I customized code for step delete language ọbject.
But it is not successfully. Only delete object 1,3,5,7
Could you help me?
*******************************
public void DeleteAllLanguages_CodedStep1()
{
ActiveBrowser.RefreshDomTree();
HtmlDiv htmlDiv = Find.ById<HtmlDiv>("dnn_ctr438_EditRegionLanguage_UP");
List<HtmlListItem> listItemsCollection = htmlDiv.Find.AllByAttributes<HtmlListItem>("class=inline").ToList();
System.Threading.Thread.Sleep(1000);
Log.WriteLine("Number of language object:"+listItemsCollection.Count);
System.Threading.Thread.Sleep(1000);
foreach(HtmlListItem listItem in listItemsCollection)
{
Log.WriteLine("1111111111111Item");
listItem.MouseHover();
System.Threading.Thread.Sleep(1000);
Log.WriteLine(string.Format("BBBBBBBBBBBMouseover"));
IList<HtmlControl> delete_div = listItem.Find.AllByAttributes<HtmlControl>("class=body-component-menu-delete");
if((delete_div != null) && (delete_div.Count > 0))
{
Log.WriteLine(string.Format("language tile object deleted"));
delete_div[0].MouseClick();
System.Threading.Thread.Sleep(1000);
}
}
}
Please refer to attachment
Thanks
I customized code for step delete language ọbject.
But it is not successfully. Only delete object 1,3,5,7
Could you help me?
*******************************
public void DeleteAllLanguages_CodedStep1()
{
ActiveBrowser.RefreshDomTree();
HtmlDiv htmlDiv = Find.ById<HtmlDiv>("dnn_ctr438_EditRegionLanguage_UP");
List<HtmlListItem> listItemsCollection = htmlDiv.Find.AllByAttributes<HtmlListItem>("class=inline").ToList();
System.Threading.Thread.Sleep(1000);
Log.WriteLine("Number of language object:"+listItemsCollection.Count);
System.Threading.Thread.Sleep(1000);
foreach(HtmlListItem listItem in listItemsCollection)
{
Log.WriteLine("1111111111111Item");
listItem.MouseHover();
System.Threading.Thread.Sleep(1000);
Log.WriteLine(string.Format("BBBBBBBBBBBMouseover"));
IList<HtmlControl> delete_div = listItem.Find.AllByAttributes<HtmlControl>("class=body-component-menu-delete");
if((delete_div != null) && (delete_div.Count > 0))
{
Log.WriteLine(string.Format("language tile object deleted"));
delete_div[0].MouseClick();
System.Threading.Thread.Sleep(1000);
}
}
}
Please refer to attachment
Thanks