[webdriver] how to deal with downloading in Chrome

2,099 views
Skip to first unread message

shen xieyin

unread,
Feb 17, 2012, 8:00:05 AM2/17/12
to webdriver
Hi,

I just started to use Chrome to automate some case, and when dealing with downloading, we used to specify the downloading destination in the Option/Under the Hood/Downloading configuration, but when the webdriver launch Chrome, seems every time the downloading destination is restored to the default value in each session. Do you know if Chrome has the same setting like FF profile session that we can always specify this value, or we have other way?



Thanks,
-Shen

Krishnan Mahadevan

unread,
Feb 17, 2012, 8:54:33 AM2/17/12
to webd...@googlegroups.com
You can perhaps think of creating a chrome profile [ refer :  http://www.labnol.org/software/create-family-profiles-in-google-chrome/4394/ ]


and try with that .


Thanks & Regards
Krishnan Mahadevan

"All the desirable things in life are either illegal, expensive, fattening or in love with someone else!"


--
You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.

shen xieyin

unread,
Feb 19, 2012, 1:17:57 AM2/19/12
to webd...@googlegroups.com
Thanks now I can launch chrome with creating a specified profile and use capability to link it. But I still found one problem is after create a custom profile and I manually use chrome.exe to launch it and then change some setting in the options (like downloads location, etc), but if I launch it with chrome driver, I found those setting is not saved. Seems it's like using a new session or all the options setting will be cleared at that time? any idea?

2012/2/17 Krishnan Mahadevan <krishnan.ma...@gmail.com>

Krishnan Mahadevan

unread,
Feb 19, 2012, 10:06:48 PM2/19/12
to webd...@googlegroups.com
In the case of FirefoxDriver I know that a duplicate copy of the profile is made prior to it being used. Would the same hold good in the case of ChromeDriver too?
My Scribblings @ http://wakened-cognition.blogspot.com/

shen xieyin

unread,
Feb 21, 2012, 12:54:45 AM2/21/12
to webd...@googlegroups.com
seems different. I also tried to find a chrome cmd to set the file download location but cannot find more resource. Any help for me ?

Mark Collin

unread,
Feb 21, 2012, 4:34:29 AM2/21/12
to webd...@googlegroups.com

Here’s a file downloader implementation in Java that is cross browser compliant:

 

File Downloader

--

You received this message because you are subscribed to the Google Groups "webdriver" group.
To post to this group, send email to webd...@googlegroups.com.
To unsubscribe from this group, send email to webdriver+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/webdriver?hl=en.


-- This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify postm...@ardescosolutions.com

shen xieyin

unread,
Aug 22, 2012, 3:23:42 AM8/22/12
to webd...@googlegroups.com
Hi  Krishnan, I did not the related flag to control the file download location, do you know what's it?


Thanks,
-Shen

Mark Collin

unread,
Aug 22, 2012, 4:31:01 AM8/22/12
to webd...@googlegroups.com
I would suggest a read of this:



http://ardesco.lazerycode.com/index.php/2012/07/how-to-download-files-with-s
elenium-and-why-you-shouldnt/



Maybe you don't even need to download some files?



From: webd...@googlegroups.com [mailto:webd...@googlegroups.com] On
Behalf Of shen xieyin
To post to this group, send email to webd...@googlegroups.com <javascript:>

granite....@gmail.com

unread,
Jul 31, 2014, 9:22:36 AM7/31/14
to webd...@googlegroups.com
Hi Mark,

I have tried to use this class FileDownloader, but found that it requires a href of the link. But here in my case the file download start on clicking a button which does not conatin any 'href' in the html page.
Here is my html page content:

<form style="margin-top: 10px; margin-bottom: 10px; padding-bottom: 10px;" method="post" action=".">
<fieldset>
<input class="action button download" type="submit" value="Download" name="download">
<input type="hidden" value="f77YIEmFWL8RXXes3pN57uw9IjPU1HRZ" name="csrfmiddlewaretoken">
</fieldset>
</form>

Please provide some solution.

Regards
Shivani
Reply all
Reply to author
Forward
0 new messages