ExecuteCommand failed!InError set by the client. Client Error:System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at mshtml.HTMLLocationClass.get_href() at ArtOfTest.InternetExplorer.IECommandProcessor.SetCurrentDocumentMarkup(BrowserCommand& response) at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessInformationCommands(BrowserCommand request) at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)BrowserCommand (Type:'Information',Info:'DocumentMarkup',Action:'NotSet',Target:'null',Data:'',ClientId:'Client_3ecdd8b9-8844-4643-809f-bf8316271f38',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at mshtml.HTMLLocationClass.get_href() at ArtOfTest.InternetExplorer.IECommandProcessor.SetCurrentDocumentMarkup(BrowserCommand& response) at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessInformationCommands(BrowserCommand request) at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')InnerException: none.
...................................Timed out waiting '5000' msec. for any dialog to be handled '1'InnerException:System.TimeoutException: Timed out waiting '5000' msec. for any dialog to be handled '1' at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilAnyHandled(IEnumerable`1 dialogs, Int32 handleCount, Int64 timeoutMilliseconds, Boolean resetHandleCount) at ArtOfTest.WebAii.Win32.Dialogs.BaseDialog.WaitUntilHandled(Int32 handleCount, Int32 timeout, Boolean resetHandleCount) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(Browser browser) at ArtOfTest.WebAii.Design.IntrinsicTranslators.Descriptors.DialogHandlerDescriptor.Execute(IAutomationHost browser) at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)
Unable to locate element. Details: Attempting to find [Html] element using Find logic (Html): [id 'Exact' ctl00_m_g_32993630_d000_446f_aae0_0651008dc19b_ctl00_ctl02_ctl00_toolBarTbl_RightRptControls_ctl00_ctl00_diidIOSaveItem] AND [tagname 'Exact' input]Inside Frame:[Frame:name=Frame_0,src=http://gtpdoc/sites/20114/MT1G!/1/MTG6,UseQuery:True]Unable to locate element. Search failed!
<
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>