I am trying to open Ms Edge in Elevated Mode, but I am unable to do so. (Windows 11)
I have tried to open it manually too, but the Elevated option is always set to 'No'.
Image showing Edge Elevated Mode Status:

I have tried using the below options via selenium
admin_edge_options = webdriver.IeOptions()
admin_edge_options.use_chromium = True
admin_edge_options.add_argument('--ie-mode-test')
admin_edge_options.add_argument('--no-sandbox')
admin_edge_options.add_argument('--disable-gpu')
admin_edge_options.add_argument('--disable-software-rasterizer')
admin_edge_options.add_argument('--disable-dev-shm-usage')
admin_edge_options.add_argument('--disable-extensions')
driver = webdriver.Ie(options=admin_edge_options)
Manually I have tried
- Run as Administrator:
- Right-click on the Microsoft Edge shortcut or executable.
- Choose "Run as administrator" to launch Edge with elevated privileges.
- Run after Temporarily disabling windows defender
I tried to perform the same on another Machine (windows 10),facing the same issue.
My config. python 3.12 selenium 4.18.1
Edit 1:
Added edge://version screenshot.

I test and search information and found that it's by design. For chromium-based browsers, it's not recommended to launch the browser Elevated for any reason, as it leads to potential security issues. For these reasons it has built in the behavior to automatically "de-elevate" the browser if it is launched as an administrator.
If you still want to open Edge with elevated privileges, you can try opening it with an administrator account and add
--no-sandboxflag to Edge. For example, logging in Windows with an administrator account and use the code below to open Edge in Selenium: