--user-data-dir to set chrome profile to default causes chrome to crash on Selenium 2 node.

919 views
Skip to first unread message

Newbee

unread,
Jun 12, 2012, 7:44:47 PM6/12/12
to seleniu...@googlegroups.com
This is what I am trying to achieve: 

I have a custom extension that i need to run on the node to test a web client. I have now managed to acheive this by sending it over the network from the hub to the node. See thread: https://groups.google.com/forum/?fromgroups#!starred/selenium-users/xuTlVYs5rLI

But I still am trying to figure out how I can run my node chrome browser with the profile that has this extension already installed instead of sending this over the grid. See below my code: 
________________WIKI CODE____________________________________________________________________
Or to load with a specific profile (note that the default profile directories can be found here):

  DesiredCapabilities capabilities = DesiredCapabilities.chrome();
  capabilities.setCapability("chrome.switches", Arrays.asList("--user-data-dir=/path/to/profile/directory"));
  WebDriver driver = new ChromeDriver(capabilities);
__________________________________________________________________________________________________

________________________________My code__________________________________________________________

_chroptions.AddArguments(@"--user-data-dir= C:\Users\Administrator\AppData\Local\Google\Chrome\User Data\Default");
_____________________________________________________________________________________________________

But this causes the Chrome browser on the node to crash. I am not sure if I am doing this correctly .. or if i am missing something. Any input is appreciated. 

Thanks. 

Jim Evans

unread,
Jun 12, 2012, 8:36:38 PM6/12/12
to seleniu...@googlegroups.com
As mentioned in the wiki, you can't specify a profile for running Chrome. Check out the section labelled "Known Issues", where item number 3 will be of interest.

--Jim

Newbee

unread,
Jun 12, 2012, 10:38:53 PM6/12/12
to seleniu...@googlegroups.com
Thanks again Jim, I overlooked that one ... will have to work with what I have for now i guess 
Reply all
Reply to author
Forward
0 new messages