![]() You can use this variable in your workflow as needed. After running the workflow, the downloadDirectory variable will contain the default downloads path of Google Chrome.Select p(“CommandLine”).ToString().Split("–download-directory=“c)(1).Split(” "c)(0)).FirstOrDefault() Where p(“CommandLine”) IsNot Nothing AndAlso p(“CommandLine”).ToString().Contains(“–download-directory=”) In the “Value” field, use the following expression:ĭownloadDirectory = (From p In New (“SELECT * FROM Win32_Process WHERE Name=‘chrome.exe’”).Get().Cast(Of )() In the “To” field of the “Assign” activity, create a variable to store the Chrome download directory. TargetObject: Create a new variable of type and set it to new ("Win32_Process").Īfter the “Invoke Method” activity, add an “Assign” activity to retrieve the Chrome download directory. Hi the “Invoke Method” activity, you can use the following settings: This gives the path to the profile directory. Use web automation where open browser and mimic the same set of steps u do to navigate and get the default folder details in Chrome with Ui based activities like click activityĬheers Can get default downloads path of chrome using UiPath with out interacting with web ? To determine the user data directory for a running Chrome instance: Navigate to chrome://version. If not through powershell then other option is to interact with browser’s UI ' Read the Chrome download path from the Registryĭim chromeDownloadPath As String = (keyPath).GetValue(valueName).ToString()Ĭonsole.WriteLine("Chrome Download Path: " & chromeDownloadPath) When you click on the change button, a new window will appear where you’ll. Since it will be the only option on the page, the change button will be easy to spot. Once you’re in settings, click on Advanced to your left and choose the Downloads option. ' Define the Registry key for Chrome settingsĭim keyPath As String = "Software\Google\Chrome\PreferenceMACs\Default"ĭim valueName As String = "fault_directory" To start, click on the dots at the top right and go to Settings. Inside the “Invoke Code” activity, you can use the following VB.NET code to read the Chrome download path from the Windows Registry:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |