or
// Execute test 'Verification' try{ ExecuteTest("C:\\pathhToTest"); }catch(NullReferenceException e){ Log.WriteLine("NullRef"); }catch(TimeoutException t){ Log.WriteLine("Timeout exception...."); }
SubTest
[CodedStep(@"Navigate to vanity url]")]
public void SubTest_CodedStep()
{
// Navigate to : 'http://- DataDriven: [$(Vanity)].com/' - DataDriven: [$(test)]
String vanity = ((string)(System.Convert.ChangeType(Data["Vanity"], typeof(string))));
String fullUrl = "http://" + vanity + ".qasb5.com";
Log.WriteLine("NAVIGATING TO: " + fullUrl);
ActiveBrowser.NavigateTo(fullUrl, false);
}
[CodedStep(@"Verify element 'DealerLogoPanelDiv' 'is' visible.")]
public void Verification_CodedStep()
{
// Verify element 'DealerLogoPanelDiv' 'is' visible.
Log.WriteLine("starting test findDealerLogo");
HtmlFindExpression expr = new HtmlFindExpression("id=~DealerLogoPanel");
ActiveBrowser.WaitForElement(expr, 4000, false);
Element e1 = ActiveBrowser.Find.ByExpression(expr);
HtmlControl ctrl = new HtmlControl(e1);
Assert.IsTrue(ctrl.IsVisible());
}
I hope I provided enough information and would appreciate any help!
Mariovar myApp= Pages.TelerikTreeViewFor.SilverlightApp;Telerik.WebAii.Controls.Xaml.RadTreeView tree= myApp.XTreeViewRadtreeview;tree.InvokeMethod(new AutomationMethod("ExpandAll", typeof(void)));IList<Telerik.WebAii.Controls.Xaml.RadTreeView> items = tree.Find.AllByType<Telerik.WebAii.Controls.Xaml.RadTreeView>();int nrNodes= items.Count();Log.WriteLine("Number of nodes: "+ nrNodes);