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 Span
ActiveBrowser.Window.SetFocus
Pages.CreateNewUser.PleaseSelectSpan.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
Pages.CreateNewUser.PleaseSelectSpan.MouseClick
If
Data(
"firstname"
) =
"admin"
Then
'Click 'ProgramListItem'
ActiveBrowser.Window.SetFocus
Pages.CreateNewUser.ProgramListItem.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
Pages.CreateNewUser.ProgramListItem.MouseClick
End
If
If
Data(
"firstname"
) =
"man"
Then
'Click 'SiteManagerListItem'
ActiveBrowser.Window.SetFocus
Pages.CreateNewUser.SiteManagerListItem.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
Pages.CreateNewUser.SiteManagerListItem.MouseClick
End
If
If
Data(
"firstname"
) =
"staff"
Then
'Click 'StaffMemberListItem'
ActiveBrowser.Window.SetFocus
Pages.CreateNewUser.StaffMemberListItem.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
Pages.CreateNewUser.StaffMemberListItem.MouseClick
End
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....
<
telerik:RadPanelBar
runat
=
"server"
ID
=
"RadPanelBar1"
Width
=
"100%"
Skin
=
"Vista"
OnClientLoad
=
"onLoad"
>
<
Items
>
<
telerik:RadPanelItem
>
<
ItemTemplate
>
</
ItemTemplate
>
</
telerik:RadPanelItem
>
<
telerik:RadPanelItem
Expanded
=
"true"
>
<
HeaderTemplate
>
<
div
style
=
"float: left; padding-top: 1px; z-index: 2800;"
>
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
OnClientItemClicked
=
"onItemClicked"
Skin
=
"Forest"
Style
=
"z-index: 2900"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Favorites"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Records Last Accessed"
Selected
=
"true"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenu
>
</
div
>
</
HeaderTemplate
>
<
ContentTemplate
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
SelectedIndex
=
"0"
CssClass
=
"multiPage"
Height
=
"250px"
Width
=
"100%"
>
<
telerik:RadPageView
ID
=
"RadPageView1"
runat
=
"server"
>
<
div
style
=
"height: 100px"
>
</
div
>
</
telerik:RadPageView
>
<
telerik:RadPageView
ID
=
"RadPageView2"
runat
=
"server"
>
<
div
style
=
"height: 100px"
>
</
div
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
</
ContentTemplate
>
</
telerik:RadPanelItem
>
</
Items
>
<
CollapseAnimation
Duration
=
"100"
Type
=
"None"
/>
<
ExpandAnimation
Duration
=
"100"
Type
=
"None"
/>
</
telerik:RadPanelBar
>