web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Using PAD to change a ...
Power Automate
Unanswered

Using PAD to change a Microsoft Edge setting (in edge://settings). Possible?

(2) ShareShare
ReportReport
Posted on by 40

I am trying to build a flow in PAD that will download some files and for it to go smoothly I need to turn off the "Ask me what to do with each download" toggle, and also change the "Location". I then need to change things back after my flow is finished. I'm having a hard time getting the UI Element selection working right with this settings page. Perhaps it's a security protection or I am just doing it wrong. Is it possible to automate these changes to Edge settings using UI Elements actions?

I have the same question (0)
  • VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at

    Hi @Jagster ,

     

    Instead of changing the settings it edge browser,you can move the file to the required location from where it gets downloaded with Latest creation time as shown in below image.

    VishnuReddy1997_0-1720425815571.png

    Change the paths accordingly.

     

    Code:

    Please copy and paste this code to your flow.

    WebAutomation.Click.Click BrowserInstance: Mouser_Browser Control: appmask['Web Page \'h ... 1b4a29f91d\' 2']['Input submit \'Export\''] ClickType: WebAutomation.ClickType.LeftClick MouseClick: True WaitForPageToLoadTimeout: 60 MousePositionRelativeToElement: WebAutomation.RectangleEdgePoint.MiddleCenter OffsetX: 0 OffsetY: 0
    # Getting,Moving and Renaming the Downloaded BOM Report to Output Folder
    WAIT 10
    Folder.GetFiles Folder: ConfigAsCustomObject['Downloads'] FileFilter: $'''*''' IncludeSubfolders: False FailOnAccessDenied: True SortBy1: Folder.SortBy.CreationTime SortDescending1: True SortBy2: Folder.SortBy.CreationTime SortDescending2: True SortBy3: Folder.SortBy.CreationTime SortDescending3: True Files=> Downloaded_Files
    File.Move Files: Downloaded_Files[0].FullName Destination: ConfigAsCustomObject['Output Folder'] IfFileExists: File.IfExists.Overwrite MovedFiles=> MovedFiles
    File.RenameFiles.Rename Files: MovedFiles[0].FullName NewName: $'''MouserBOM_%Todays_DateTime%''' KeepExtension: True IfFileExists: File.IfExists.Overwrite RenamedFiles=> Mouser_BOM_Files
    
    # [ControlRepository][PowerAutomateDesktop]
    
    {
     "ControlRepositorySymbols": [
     {
     "IgnoreImagesOnSerialization": false,
     "Repository": "{\r\n \"Screens\": [\r\n {\r\n \"Controls\": [\r\n {\r\n \"AutomationProtocol\": \"uia3\",\r\n \"ScreenShot\": null,\r\n \"ElementTypeName\": \"Input submit\",\r\n \"InstanceId\": \"5abdbf92-47e5-41f5-a84d-006314cb26c3\",\r\n \"Name\": \"Input submit 'Export'\",\r\n \"SelectorCount\": 1,\r\n \"Selectors\": [\r\n {\r\n \"CustomSelector\": null,\r\n \"Elements\": [\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"responsive en-GB\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Body '!function (a, b, c, d, e, f){ a.ddjskey = e; ... d:google_tag_manager[\\\"rm\\\"][\\\"80568\\\"](22)});'\",\r\n \"Tag\": \"body\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": false,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"page-wrapper\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div '!function (a, b, c, d, e, f){ a.ddjskey = e; ... UkkhRCrGt\\\")).start() } catch (i) { } })();'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": false,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"mainContainer\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div 'Home Bill Of Materials (BOM) Tool Bill Of Materials ... fa-fw tooltip-icon\\\" aria-hidden=\\\"true\\\"></i> </div>'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"content-container\"\r\n },\r\n {\r\n \"Ignore\": false,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"content-container\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div 'Home Bill Of Materials (BOM) Tool Bill Of Materials ... fa-fw tooltip-icon\\\" aria-hidden=\\\"true\\\"></i> </div>'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"content-fixed-width\"\r\n },\r\n {\r\n \"Ignore\": false,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"content-fixed-width\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div 'Home Bill Of Materials (BOM) Tool Bill Of Materials ... fa-fw tooltip-icon\\\" aria-hidden=\\\"true\\\"></i> </div>'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": false,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"form-horizontal\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div 'Home Bill Of Materials (BOM) Tool Bill Of Materials ... fa-fw tooltip-icon\\\" aria-hidden=\\\"true\\\"></i> </div>'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"bom hidden-for-nojs\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div 'Choose from the dropdowns below to select data to ... 1 29 04025C101JAT2A 5 30 C3216X7R1H106K160AE 1 Back'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"content\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div 'Choose from the dropdowns below to select data to ... 1 29 04025C101JAT2A 5 30 C3216X7R1H106K160AE 1 Back'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Action\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"https://www.mouser.in/Bom/OutputMapping?bomId=9d0bdcdc-ee93-4def-aa34-d61b4a29f91d\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": false,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"mapping\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Method\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"post\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Name\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Form 'Choose from the dropdowns below to select data to ... 1 29 04025C101JAT2A 5 30 C3216X7R1H106K160AE 1 Back'\",\r\n \"Tag\": \"form\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"pull-right\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": true,\r\n \"Name\": \"Div 'Back'\",\r\n \"Tag\": \"div\"\r\n },\r\n {\r\n \"Attributes\": [\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Checked\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"false\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Class\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"button datalayer-clickeventbound\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Disabled\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"false\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"FormAction\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"FormMethod\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": false,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Id\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"btnExport\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Max\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Min\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Name\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": true,\r\n \"Name\": \"Ordinal\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": 0\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"ReadOnly\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"false\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Required\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"false\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Src\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Step\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Title\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": null\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Type\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"submit\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Value\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"Export\"\r\n },\r\n {\r\n \"Ignore\": true,\r\n \"IsOrdinal\": false,\r\n \"Name\": \"Text\",\r\n \"Operation\": \"EqualTo\",\r\n \"Value\": \"Export\"\r\n }\r\n ],\r\n \"CustomValue\": null,\r\n \"Ignore\": false,\r\n \"Name\": \"Input submit 'Export'\",\r\n \"Tag\": \"input\"\r\n }\r\n ],\r\n \"Ignore\": false,\r\n \"ImageSelector\": null,\r\n \"IsCustom\": false,\r\n \"IsImageBased\": false,\r\n \"IsWindowsInstance\": false,\r\n \"Name\": \"Default Selector\",\r\n \"Properties\": []\r\n }\r\n ],\r\n \"Tag\": \"input\",\r\n \"ScreenshotPath\": \"controlRepo-screenshots\\\\0f181fde-6796-4cef-82ec-ffc75778771a.png\"\r\n }\r\n ],\r\n \"Handle\": {\r\n \"value\": 0\r\n },\r\n \"ProcessName\": null,\r\n \"ScreenShot\": null,\r\n \"ElementTypeName\": \"Web Page\",\r\n \"InstanceId\": \"f2b4bafe-634b-4010-ae46-dc8b57317b0b\",\r\n \"Name\": \"Web Page 'h ... 1b4a29f91d' 2\",\r\n \"SelectorCount\": 1,\r\n \"Selectors\": [\r\n {\r\n \"CustomSelector\": null,\r\n \"Elements\": [\r\n {\r\n \"Attributes\": [],\r\n \"CustomValue\": \"domcontainer\",\r\n \"Ignore\": false,\r\n \"Name\": \"Web Page 'https://www.mouser.in/Bom/OutputMapping?bomId=9d0bdcdc-ee93-4def-aa34-d61b4a29f91d'\",\r\n \"Tag\": \"domcontainer\"\r\n }\r\n ],\r\n \"Ignore\": false,\r\n \"ImageSelector\": null,\r\n \"IsCustom\": false,\r\n \"IsImageBased\": false,\r\n \"IsWindowsInstance\": false,\r\n \"Name\": \"Default Selector\",\r\n \"Properties\": []\r\n }\r\n ],\r\n \"Tag\": \"domcontainer\",\r\n \"ScreenshotPath\": \"controlRepo-screenshots\\\\13435cfa-f7c4-458d-8b54-bfaf298eff89.png\"\r\n }\r\n ],\r\n \"Version\": 1\r\n}",
     "ImportMetadata": {
     "DisplayName": "Local computer",
     "ConnectionString": "",
     "Type": "Local",
     "DesktopType": "local"
     },
     "Name": "appmask"
     }
     ],
     "ImageRepositorySymbol": {
     "Repository": "{\r\n \"Folders\": [],\r\n \"Images\": [],\r\n \"Version\": 1\r\n}",
     "ImportMetadata": {},
     "Name": "imgrepo"
     },
     "ConnectionReferences": []
    }

     

    (Note:- if you got your solution you can mark as solution and gives kudos)


    Thanks & Regards

    Vishnu Reddy

     

  • SayanPatra Profile Picture
    on at

    Hey @Jagster 

    Are you trying to Automate the process in which you are trying to 

    Navigate to Edge settings -> Turn off the Toogle -> Change the Download Location 

     

    Yes, You can Automate the process but nowadays Modern browsers have security features that might interfere with automated scripts interfacing with their settings.

    It is also not a best practice to Automate privacy settings of a browser.

     

    Instead of this you can do one thing 

    You can manually change the file location where you want to download the files.After that you can run a process to move the file from that location to wherever you want.

     

    Thank You

    If my suggestion helped you, please give it a Thumbs up and marked it as a solution so that it can benefit others in the community.

     

    Sayan Patra 

    RPA Developer 

  • Jagster Profile Picture
    40 on at

    I appreciate the information, but currently, I am not experiencing issues with file movement. Instead, I am seeking to automate the download folder prompt and location settings. My main focus is on toggling the "Ask me what to do with each download" option. Typically, I keep this feature active, but for my PAD flow, I need it deactivated and then reactivated upon completion. Initially, I am exploring whether this can be achieved through UI Elements, CLI commands, or possibly automating changes to the Local Security Policy, before considering the automation of mouse movements and screen clicks. I'm new to PAD, only having learned about it about a week ago, and have made only a few flows so I'm still getting familiar with it's capabilities, syntax, and operations. 

  • Jagster Profile Picture
    40 on at

    @SayanPatra wrote:

    Are you trying to Automate the process in which you are trying to 

    Navigate to Edge settings -> Turn off the Toogle -> Change the Download Location 


    Yes, that setting but primarily I'd like to toggle the "Ask me what to do with each download" option.

     


    @SayanPatra wrote:

    Yes, You can Automate the process but nowadays Modern browsers have security features that might interfere with automated scripts interfacing with their settings.

    It is also not a best practice to Automate privacy settings of a browser.


    I'm starting to suspect that underlying security design in the browser is what is causing my UI Elements actions to fail. Attempting to use the "Get details of element on web page" and "Click link on a web page" actions, I get nowhere. It appears that the edge://setttings tab is not really seen as a "browser tab" to PAD. So Instead I have tried using the "Get details of UI Element in window" and "Click UI Element in window", to which I have had limited success. It works directly after selecting the elements as long as the I keep the same settings tab open but if I close and re-launch the settings tab, it stops working. I presume this is because the new settings tab is opened using a different handle or parameter which is different that the UI Element picker originally captured.

     

    If it can't be done with UI Elements, I'm looking into possibilities of scripting using alternate methods (CMD, Powershell, Python, etc), automated Local Group Policy adjustments, or falling back to X/Y screen location mouse clicks (last resort).

     


    @SayanPatra wrote:

    Instead of this you can do one thing 

    You can manually change the file location where you want to download the files.After that you can run a process to move the file from that location to wherever you want.


    This is how I'm doing it at the moment, but would love to automate the entire process.

  • Jagster Profile Picture
    40 on at

    Ultimately, I had to resort to using sending mouse clicks to X/Y screen locations and such. Not the way I prefer but I couldn't find any way to make the changes using Web or UI Elements, powershell commands, or registry changes.

     

    My final code is more complex for my particular needs, but below gives the gist of the process. If anyone knows a better, more efficient or failproof way to accomplish this please let me know. The following code can be pasted into a flow. If I keep it this way, I plan on figuring some way to determine the state of the toggle switches and not toggle if they are already set correctly.

     

    IF IsEmpty(Browser_EdgeSettings) THEN
     WebAutomation.LaunchEdge.LaunchEdgeNoWait Url: $'''https://www.google.com''' WindowState: WebAutomation.BrowserWindowState.Normal ClearCache: False ClearCookies: False Timeout: 60 BrowserInstance=> Browser_EdgeSettings
     WAIT 1
     UIAutomation.MoveWindow.MoveByInstanceOrHandle WindowInstance: Browser_EdgeSettings X: 0 Y: 0
     WAIT 1
     UIAutomation.ResizeWindow.ResizeByInstanceOrHandle WindowInstance: Browser_EdgeSettings Width: 1280 Height: 720
     WAIT 1
     WebAutomation.CreateNewTab.CreateNewTab BrowserInstance: Browser_EdgeSettings Url: $'''edge://settings/downloads''' WaitForPageToLoadTimeout: 60 NewBrowserInstance=> NewBrowser_Tab
     WAIT 2
    END
    System.GetEnvironmentVariable.GetEnvironmentVariable Name: $'''USERPROFILE''' Value=> EnvironmentVariable_UserDir
    SET Download_Folder TO $'''%EnvironmentVariable_UserDir%\\Downloads\\PowerAutomate_Downloads'''
    IF (Folder.IfFolderExists.DoesNotExist Path: Download_Folder) THEN
     @@copilotGeneratedAction: 'False'
    Scripting.RunPowershellScript.RunPowershellScript Script: $'''New-Item -ItemType Directory -Path \"%Download_Folder%\"''' ScriptOutput=> PowershellOutput
    END
    UIAutomation.FocusWindow.FocusByInstanceOrHandle WindowInstance: Browser_EdgeSettings
    # Toggle 'Show downloads menu when a download starts'
    MouseAndKeyboard.SendMouseClick.ClickAt ClickType: MouseAndKeyboard.MouseClickType.LeftClick MillisecondsDelay: 10 X: 1093 Y: 523 RelativeTo: MouseAndKeyboard.PositionRelativeTo.ActiveWindow MovementStyle: MouseAndKeyboard.MovementStyle.Instant
    UIAutomation.FocusWindow.FocusByInstanceOrHandle WindowInstance: Browser_EdgeSettings
    # Toggle 'Open Office files in the browser'
    MouseAndKeyboard.SendMouseClick.ClickAt ClickType: MouseAndKeyboard.MouseClickType.LeftClick MillisecondsDelay: 10 X: 1098 Y: 436 RelativeTo: MouseAndKeyboard.PositionRelativeTo.ActiveWindow MovementStyle: MouseAndKeyboard.MovementStyle.Instant
    UIAutomation.FocusWindow.FocusByInstanceOrHandle WindowInstance: Browser_EdgeSettings
    # Toggle 'Ask me what to do with each download'
    MouseAndKeyboard.SendMouseClick.ClickAt ClickType: MouseAndKeyboard.MouseClickType.LeftClick MillisecondsDelay: 10 X: 1098 Y: 361 RelativeTo: MouseAndKeyboard.PositionRelativeTo.ActiveWindow MovementStyle: MouseAndKeyboard.MovementStyle.Instant
    UIAutomation.FocusWindow.FocusByInstanceOrHandle WindowInstance: Browser_EdgeSettings
    # Activate [Change] button for Location setting.
    MouseAndKeyboard.SendMouseClick.ClickAt ClickType: MouseAndKeyboard.MouseClickType.LeftClick MillisecondsDelay: 10 X: 1088 Y: 287 RelativeTo: MouseAndKeyboard.PositionRelativeTo.ActiveWindow MovementStyle: MouseAndKeyboard.MovementStyle.Instant
    WAIT 1
    UIAutomation.FocusWindow.FocusByInstanceOrHandle WindowInstance: Browser_EdgeSettings
    # Set download location
    MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: Browser_EdgeSettings TextToSend: Download_Folder DelayBetweenKeystrokes: 10 SendTextAsHardwareKeys: False
    UIAutomation.FocusWindow.FocusByInstanceOrHandle WindowInstance: Browser_EdgeSettings
    MouseAndKeyboard.SendKeys.FocusAndSendKeysByInstanceOrHandle WindowInstance: Browser_EdgeSettings TextToSend: $'''{Return}{Tab}{Space}''' DelayBetweenKeystrokes: 100 SendTextAsHardwareKeys: False

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard