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
Highlighted
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
Highlighted
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
[Hall of Fame]
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
Highlighted
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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
Highlighted
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

Highlighted
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
Highlighted
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

Learn SmartBear products in a fun and easy way and prove your knowledge!
>>Participate in the TechCorner Challenge today
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors