or
<html> <head><title>Test</title></head> <body> Hello<b. xmlns="http://www.w3.org/1999/xhtml">World</b.> </body></html>Manager myManager = new Manager(false);myManager.Start();myManager.LaunchNewBrowser(BrowserType.InternetExplorer);Browser browser = myManager.ActiveBrowser;browser.NavigateTo("test.html");Find finder = browser.Find;string findPath = @"//li[@id='tab_CarsAndBikesTechnicalDetails1']/a";Element foundElement = finder.ByName(findPath) ?? finder.ById(findPath);I have the following code to select an item based on the user role I need to create. Is there a simpler way to do this?
Thanks,
John
'Default SpanActiveBrowser.Window.SetFocusPages.CreateNewUser.PleaseSelectSpan.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)Pages.CreateNewUser.PleaseSelectSpan.MouseClickIf Data("firstname") = "admin" Then 'Click 'ProgramListItem' ActiveBrowser.Window.SetFocus Pages.CreateNewUser.ProgramListItem.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop) Pages.CreateNewUser.ProgramListItem.MouseClickEnd IfIf Data("firstname") = "man" Then 'Click 'SiteManagerListItem' ActiveBrowser.Window.SetFocus Pages.CreateNewUser.SiteManagerListItem.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop) Pages.CreateNewUser.SiteManagerListItem.MouseClickEnd IfIf Data("firstname") = "staff" Then 'Click 'StaffMemberListItem' ActiveBrowser.Window.SetFocus Pages.CreateNewUser.StaffMemberListItem.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop) Pages.CreateNewUser.StaffMemberListItem.MouseClickEnd If<option value="">Please select</option><option value="1">Program administrator</option><option value="2">Site manager</option><option value="4">Staff member</option>------------------------------------------------------------ '14/10/2011 17:40:54' - Error encountered during execution. ------------------------------------------------------------ '14/10/2011 17:40:54' - Error launching the runner. Error: System.TimeoutException: The operation has timed out. at System.IO.Pipes.NamedPipeClientStream.Connect(Int32 timeout) at ArtOfTest.WebAii.Design.Execution.RunnerController.Launch(Int32 waitForReadyTimeout, String pathToRunner, Boolean isManual, Int32& runnerProcId) ------------------------------------------------------------ '14/10/2011 17:40:54' - Aborting....