cancel
Showing results for 
Search instead for 
Did you mean: 

Changing Downloads path in Chrome browser

SOLVED
Highlighted
New Contributor

Changing Downloads path in Chrome browser

Hello,

 

Any recommendations on changing the Downloads folder in a Chrome browser via TestComplete? The default points to the Downloads folder on my local machine (which includes my Windows username in the file path). At the beginning of the test, I'd like to change this Downloads folder so that this test can run on other machines.

 

Thanks in advance for any help!

 

Brandon Scherzer

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
New Contributor

Re: Changing Downloads path in Chrome browser

Thanks a lot for the suggestions and help! We are going to modify the download folder on our machines that will run this automation in lieu of writing code to do this. We may circle back later and apply the code, but until then, our QA group was fine with creating a specific folder on our machines so the tests will run.

View solution in original post

5 REPLIES 5
Community Hero

Re: Changing Downloads path in Chrome browser

In some research out there, Chrome actually "protects" from scripting the change of that folder.  So, this sounds like something you might need to do in environmental prep on your workstations.  

 

What I would recommend is that, in Chrome settings on all machines you intend on executing automation, set it o prompt for download location and then script for that rather than just accepting the default.


Robert Martin
[Community Expert Group]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Community Manager

Re: Changing Downloads path in Chrome browser

Thanks a lot tristaanogre for suggesting the workaround! 

 

Hi @bscherzer , did you have a chance to apply the suggestion? 

I have another one you might find helpful – there's a way to download files from the Internet and specify the folder you need. Please refer to this article for details. 

 

Let us know how it goes! Smiley Happy



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!
New Contributor

Re: Changing Downloads path in Chrome browser

Thanks a lot for the suggestions and help! We are going to modify the download folder on our machines that will run this automation in lieu of writing code to do this. We may circle back later and apply the code, but until then, our QA group was fine with creating a specific folder on our machines so the tests will run.

View solution in original post

Community Hero

Re: Changing Downloads path in Chrome browser

Another solution is to use Sys.UserName to get the current username and build your path to file with that.


Thanks,
Carson

Click the Accept as Solution button if my answer has helped
Community Manager

Re: Changing Downloads path in Chrome browser

Thank you everyone for advice! 

 

@bscherzer It is great to hear you found a solution, thank you for sharing this. 



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!