Ramdomly 'System.UnauthorizedAccessException: Access is denied' when set a property for HTML input Checkbox
This is a Web Application automation based on Internet Explorer, Windows 10 and the Pega Automation runtime is V8.0.2025.0
I got this error totally randomly in my automation machine, never occurs in my Pega Robotics Studio, but sometimes occurs in my dedicated RPA service (on a dedicated machine just for this), the control is succesfully recognised on a list of almost 900 elements, that is the reason of 'WaitForCreate'.
I got this error because this section is covered in a Try-Catch.
The process need to be executed multiple times in the day but as soon I got this error, all the remaining iterations always fails the same.
System.UnauthorizedAccessException: Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) at mshtml.HTMLInputElementClass.IHTMLElement_setAttribute(String strAttributeName, Object AttributeValue, Int32 lFlags) at OpenSpan.Adapters.Web.Wrappers.HtmlElementWrapper.setAttribute(String strAttributeName, Object AttributeValue, Int32 lFlags) at OpenSpan.Adapters.Web.HtmlElement.SetAttribute(String attributeName, String value) at OpenSpan.Adapters.Web.Controls.WebControl.SetAttribute(String attributeName, String value)
(Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).
Please If you need some more information just tell me what you need from me to upload it.
It is unclear from the exception what is happening. In your RuntimeLog you might be able to see which step is causing it. Perhaps there is a timing issue where you are operating on an element before it is ready. I would start with the RuntimeLog to determine where exactly this is occurring.
Unless this is a public website and you can upload your solution, I believe your best course of action is to open a support request. I would need to see a RuntimeLog along with your solution source code to really offer any suggestions as to what to change.
If you do open an SR, please report the SR number back here so we can track it.