danwagnerco / selenium-vba

Automatically exported from code.google.com/p/selenium-vba
1 stars 0 forks source link

ChromeDriver Capabilities/ChromeOptions with Selenium-VBA #33

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

Thank you very much for creating this wrapper, it works wonderfully well. I 
just have one question I was wondering if you could help me out with.

Is it possible to run the wrapper with chromedriver browser using specific 
chrome command line arguments, and if so, then how? I see that the Capabilities 
for chromedriver are set out here: 
https://sites.google.com/a/chromium.org/chromedriver/capabilities but I'm not 
sure how to implement it in VBA code since I am sort of a beginner programmer. 
More specifically, I'm trying to find out how to use selenium in my default 
chrome profile (user-data-dir) as well as using the webdriver proxy capability. 
The examples can be seen at the ChromeDriver website.

If you could point me in the right direction, I would be very grateful.

Original issue reported on code.google.com by stha...@gmail.com on 31 Oct 2013 at 7:09

GoogleCodeExporter commented 9 years ago
'To start chrome maximized :
driver.addArgument "--start-maximized"

'To automatically download  files to a directory :
driver.setPreference "download.default_directory", "C:\temp"
driver.setPreference "download.directory_upgrade", true
driver.setPreference "download.extensions_to_open", ""
driver.setPreference "download.prompt_for_download", false

'To set a proxy :
driver.setProxy "193.33.142.156"

'To set a profile :
driver.setProfile "C:\...\User Data"

'To start chrome :
driver.start "chrome", "http://www.google.com"

Be aware that addArgument, setPreference, setProxy and setProfile have to be 
called before the start command to be effective.
Moreover setPreference is only working with chrome since version 1.0.16.0 
(04/11/2013).

Hope this will help.

Original comment by florentbr on 4 Nov 2013 at 9:28

GoogleCodeExporter commented 9 years ago
Thank you so much, it is all working perfectly. You have been been very helpful 
and I am truly grateful for all your hard work.

Original comment by stha...@gmail.com on 4 Nov 2013 at 10:11

GoogleCodeExporter commented 9 years ago

Original comment by florentbr on 8 Sep 2014 at 5:40