By default Safari WebDriver uses the /Users/[username]/Library/Safari location as the data directory location. This location can be overridden per 'dataDir' option on Safari WebDriver (please see this link)

I have tried the following ways to set this property in Intern configuration and none has been successful:

environments:[
{ browserName: 'safari', version: 'ANY', platform: 'MAC',
  dataDir:'/Users/[username]/Library/Safari'
//or
  'safari.options.dataDir':'/Users/[username]/Library/Safari'
//or
  'safari-option-dataDir':'/Users/[username]/Library/Safari'
  }
]

Please advise as to how this and other WebDriver capabilities can be set through the Intern config file in this JSON format.

有帮助吗?

解决方案

The instructions for this driver, on the configuration page you linked, are very confusing. What they are saying is that you need to put the sub-options for the driver in an object on the safari.options key, like so:

environments: [ {
  browserName: 'safari',
  version: 'ANY',
  platform: 'MAC',
  'safari.options': { dataDir: '/Users/[username]/Library/Safari' }
} ]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top