or
HtmlControl ulList = Pages.EVCloudAdministration.AccountsMenuUL;
HtmlListItem accMenuList = uList.Find.ByExpression<HtmlListItem>(
"tagname=Li"
,
"innertext=New Archive"
);
accMenuList.MouseClick();
foreach
(HtmlAnchor Reports
in
creativeReportsAnchors)
{
try
{
Log.WriteLine(Reports.HRef);
Reports.Click();
//Refresh DOM tree
System.Threading.Thread.Sleep(7000);
ActiveBrowser.RefreshDomTree();
if
(ActiveBrowser.ContainsText(productionError) ==
true
)
{
Log.WriteLine(
"ERROR: "
);
}
else
if
(ActiveBrowser.ContainsText(stagingError) ==
true
)
{
Log.WriteLine(
"ERROR: "
);
}
System.Threading.Thread.Sleep(2000);
}
catch
(Exception)
{
}
finally
{
ActiveBrowser.NavigateTo(CurrentSiteUrl +
"reports-creative.aspx"
);
}
}