Forum Discussion
You probably don't need to. Here's what we do for something similar
- Use the "Sys.Username" property to grab the username of the user currently logged in
- Get that user's "Download" directory (C:\Users\<username>\Downloads) and find the file downloade
- Use aqFileSystem object to copy the file from that directory to your desired destination.
That's ultimately easier than messing around with changing Chrome settings or manipulating download dialogs.
I will give this a try. I will definitely use it for other instances. The prblem I have is that it is code and I do not do much code. I rely heavily on recorded keyword tests. (Although I have been using a lot of the TestComplete precoded scripts and getting them to work with my tests).
- tristaanogre6 years agoEsteemed Contributor
You can do all that I suggested in keyword tests. There is an operation "Call object method" that allows you to use objects like aqFileSystem. You can use the Set Variable operation and, in the value part, set to Code expression and call the System.Username value in the expression.
One thing to note... Keyword tests ARE code... just visualized code. You're doing basically all the same stuff, just with drag and drop capabilities. Regardless, I've found that, as good as Keyword Tests are, there are always things you can do better, more easily, and more elegantly with a little bit of code.