Forum Discussion
But how to use SendKeys Action to capture Permision Dialog?
- Hassan_Ballan1 month ago
Champion Level 3
You won’t be able to capture that permission dialog as an object — Microsoft Edge treats it as part of the browser UI, not the DOM, so TestComplete can’t spy it.
What you can try, though, is using SendKeys to handle it blindly via keyboard input.
In Edge, that dialog usually defaults focus to one of the buttons (often Block), so you can simulate keyboard navigation:
// Make sure Edge window is active Sys.Browser("edge").Activate(); // Try navigating to "Allow" and confirm Sys.Browser("edge").Keys("[Tab][Enter]");Or, if needed, add more tabs depending on which button is focused:
Sys.Browser("edge").Keys("[Tab][Tab][Enter]");The idea is:
- Tab → switch between "Block" and "Allow"
- Enter → confirm the selected option
It’s not perfect (since it depends on focus and timing), but in cases like this where the dialog isn’t accessible, it’s one of the few practical workarounds. You may need to add a short delay before sending keys to ensure the dialog is visible.
If this resolves your scenario, marking it as the solution helps future readers find it quickly.