Question
Hoverstate
US
Last activity: 4 Apr 2023 10:51 EDT
Control returns "Assess Denied" message only unattended
I am running a solution that enters data to a web app. There is one control that was tough to automate with. It is a button you click to upload a file. When I call onClick nothing happens. I've found only when I call mouseDown mouseUp and sendKeys enter key that it triggers the button.
This worked for development so far, but now that we're moving to unattended testing the button failing. When it gets to that part of the code tries the sendkeys method catches the error and returns "Access is denied" message.
Thank you.
Error | 10:11:55.991 PM | 54 | MTA | Exception | | | Exception has been thrown by the target of an invocation., Verbose Message: General Information
Exception Information
1) Exception Information ********************************************* Exception Type: System.Reflection.TargetInvocationException Message: "Exception has been thrown by the target of an invocation." Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items TargetSite: System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean) HelpLink: NULL Source: "mscorlib" HResult: -2146232828
I am running a solution that enters data to a web app. There is one control that was tough to automate with. It is a button you click to upload a file. When I call onClick nothing happens. I've found only when I call mouseDown mouseUp and sendKeys enter key that it triggers the button.
This worked for development so far, but now that we're moving to unattended testing the button failing. When it gets to that part of the code tries the sendkeys method catches the error and returns "Access is denied" message.
Thank you.
Error | 10:11:55.991 PM | 54 | MTA | Exception | | | Exception has been thrown by the target of an invocation., Verbose Message: General Information
Exception Information
1) Exception Information ********************************************* Exception Type: System.Reflection.TargetInvocationException Message: "Exception has been thrown by the target of an invocation." Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items TargetSite: System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean) HelpLink: NULL Source: "mscorlib" HResult: -2146232828
StackTrace Information ********************************************* at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at OpenSpan.Utils.SafeInvokeHelper.Invoke(Object baseInstance, Object instance, MethodInfo methodInfo, Object[] args) at OpenSpan.Automation.EventLink.Execute(Object sender, ExecutionEventArgs e)
2) Exception Information ********************************************* Exception Type: System.Reflection.TargetInvocationException Message: "Exception has been thrown by the target of an invocation." Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items TargetSite: System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean) HelpLink: NULL Source: "mscorlib" HResult: -2146232828
StackTrace Information ********************************************* at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) at OpenSpan.Utils.SafeInvokeHelper.Invoke(Object baseInstance, Object instance, MethodInfo methodInfo, Object[] args) at OpenSpan.Automation.ConnectableMethod.ExecuteInvoke(Object instance, Object[] parameters, ExecutionEventArgs e) at OpenSpan.Automation.ConnectableMethod.DoCustomWork(Object instance, Hashtable inputValueHash, Hashtable outputValueHash, ExecutionEventArgs e) at OpenSpan.Automation.ConnectableWorker.DoWork(Object sender, ExecutionEventArgs executionArgs)
3) Exception Information ********************************************* Exception Type: System.ComponentModel.Win32Exception NativeErrorCode: 5 ErrorCode: -2147467259 Message: "Access is denied" Data: IDictionary (System.Collections.ListDictionaryInternal) with 0 items TargetSite: Void SendInput(Byte[], System.Collections.Queue) HelpLink: NULL Source: "System.Windows.Forms" HResult: -2147467259
StackTrace Information ********************************************* at System.Windows.Forms.SendKeys.SendInput(Byte[] oldKeyboardState, Queue previousEvents) at System.Windows.Forms.SendKeys.Send(String keys, Control control, Boolean wait) at OpenSpan.Adapters.Web.WebBase.Controls.WebPage.SendKeys(String keys)