or
Browser.RefreshDomTree();
var select = Browser.Find.ByAttributes<
HtmlSelect
>(attributes);
select.MouseClick();
Thread.Sleep(Extensions.SmallTimeOut);
Browser.RefreshDomTree();
select = Browser.Find.ByAttributes<
HtmlSelect
>(attributes);
var option = select.Options.First(itm => itm.Text.Equals(value));
option.Click();
ActiveBrowser.NavigateTo(
"http://www.google.com"
);
ActiveBrowser.Find.ByName<HtmlInputText>(
"q"
).Text =
"telerik"
;
ActiveBrowser.Find.ByName<HtmlButton>(
"btnK"
).Click();
Exception occurs:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException : ExecuteCommand failed!
InError
set
by the client. Client Error:
mozCommandProcessor: A DOM click on the target element threw an error. TagName: BUTTON Err: TypeError: Value does not implement
interface
WindowProxy.
BrowserCommand (Type:
'Action'
,Info:
'NotSet'
,Action:
'Click'
,Target:
'ElementId (tagName: '
button
',occurrenceIndex: '
1
')'
,Data:
''
,ClientId:
'8f9b7a8f-06cc-4edb-8ce9-d925a17e60bf'
,HasFrames:
'False'
,FramesInfo:
''
,TargetFrameIndex:
'-1'
,InError:
'True'
,Response:
'mozCommandProcessor: A DOM click on the target element threw an error. TagName: BUTTON Err: TypeError: Value does not implement interface WindowProxy.'
)
InnerException: none.
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.Runtime.InteropServices.COMException: Object is not connected to server (Exception from HRESULT: 0x800401FD (CO_E_OBJNOTCONNECTED))
10:39:52 at Accessibility.IAccessible.get_accChildCount()
10:39:52 at MS.Internal.AutomationProxies.Accessible.GetChildCount(IAccessible acc)
10:39:52 at MS.Internal.AutomationProxies.Accessible.GetChildren(IAccessible parent)
10:39:52 at MS.Internal.AutomationProxies.Accessible.SetAccessibleChildrenIndexAndGetChildren(IAccessible parent)
10:39:52 at MS.Internal.AutomationProxies.MsaaNativeProvider.System.Windows.Automation.Provider.IRawElementProviderFragment.GetRuntimeId()
10:39:52 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
10:39:52 at System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(Int32 errorCode)
10:39:52 at MS.Internal.Automation.UiaCoreApi.CheckError(Int32 hr)
10:39:52 at MS.Internal.Automation.UiaCoreApi.UiaNavigate(SafeNodeHandle hnode, NavigateDirection direction, Condition condition, UiaCacheRequest request)
10:39:52 at System.Windows.Automation.AutomationElement.Navigate(NavigateDirection direction, Condition condition, CacheRequest request)
10:39:52 at System.Windows.Automation.TreeWalker.GetFirstChild(AutomationElement element)
10:39:52 at ArtOfTest.Common.Extensions.AutomationExtensions.GetControlChildrenCount(AutomationElement element)
10:39:52 at ArtOfTest.WebAii.Win32.Dialogs.FirefoxConfirmDialogMatch..ctor(AutomationElement dialog)
10:39:52 at ArtOfTest.WebAii.Win32.Dialogs.ConfirmDialog.MatchesUIAutomationElement(AutomationElement element)
10:39:52 at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.<>c__DisplayClass8.<
FindUIAEDialog
>b__5(IDialogUIAutomation d)
10:39:52 at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate)
10:39:52 at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.FindUIAEDialog(AutomationElement element)
10:39:52 at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.HandleElement(AutomationElement element)
10:39:52 at ArtOfTest.WebAii.Win32.Dialogs.DialogMonitor.AutomationEvent_OnStructureChanged(Object sender, StructureChangedEventArgs e)
10:39:52 --- End of inner exception stack trace ---
10:39:52 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
10:39:52 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
10:39:52 at System.Delegate.DynamicInvokeImpl(Object[] args)
10:39:52 at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
10:39:52 at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
10:39:52 at System.Windows.Threading.DispatcherOperation.InvokeImpl()
10:39:52 at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
10:39:52 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
10:39:52 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
10:39:52 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
10:39:52 at System.Windows.Threading.DispatcherOperation.Invoke()
10:39:52 at System.Windows.Threading.Dispatcher.ProcessQueue()
10:39:52 at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
10:39:52 at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
10:39:52 at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
10:39:52 at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
10:39:52 at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
10:39:52 at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
10:39:52 at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
10:39:52 at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
10:39:52 at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
10:39:52 at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
10:39:52 at ArtOfTest.Common.DispatcherFactory.<>c__DisplayClass2.<
CreateDispatcher
>b__0()
10:39:52 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
10:39:52 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
10:39:52 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
10:39:52 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
10:39:52 at System.Threading.ThreadHelper.ThreadStart()