Adnan Ghaffar
Adnan Ghaffar

Reputation: 1423

How to set Google Chrome default profile with protractor

I want to run test with default google chrome profile e.g cache/cookies should be enabled on running tests.

I have tried below mentioned options but this is not working at all.

 capabilities: {
  'browserName': 'chrome',
  'chromeOptions': {
    'args': ['user-data-dir=/path/to/your/custom/profile']
  }

},

Upvotes: 2

Views: 1907

Answers (1)

Snuffy
Snuffy

Reputation: 34

The core problem here is that Chrome starts a new instance every time it starts. "new" is defined by a totally separate and independent Chrome that has no idea about your 'personal' profiles. I don't think it supports that somewhat obvious customer scenario.

What it CAN do instead is save your profile data for use in future "new" instances.

See this answer from 'Isaac Lyman': keep protractor browser session alive

Upvotes: 1

Related Questions