Вопрос

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