Jump to content

Getting System.ComponentModel.Win32Exception : Access is denied on using ControlSend to send keystrokes in dialogs


Recommended Posts

Hi, 

Getting System.ComponentModel.Win32Exception : Access is denied on using ControlSend to send keystrokes in windows/os generated dialogs

Piece of code I am using is this:


sleep(5000)
WinWait("[CLASS:Chrome_WidgetWin_1]","","20")
ControlSend("[CLASS:Chrome_WidgetWin_1; Title:Document Retrieval - OnBase 25.1.0.221 [Unknown] - Google Chrome]", "", "[CLASS:Intermediate D3D Window; INSTANCE:1]", "{TAB}")
ControlSend("[CLASS:Chrome_WidgetWin_1; Title:Document Retrieval - OnBase 25.1.0.221 [Unknown] - Google Chrome]", "", "[CLASS:Intermediate D3D Window; INSTANCE:1]", "{Enter}")

I need this to handle a dialog that comes from a service and my job is to click on one button and remove it from focus. Also most importantly i need to run this code via jenkins in a remote vm where my automation tests run.

Sharing a screenshot of the AutoIt v3 and the dialog that i want to handle:

image.png.37ea025849074704daebe009109c5000.png


image.png.b7edebb099efd7a249302f734f4f9db7.png

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...