browser.getProcessedConfig 在量角器中
browser.getProcessedConfig in Protractor
Protractor 在全局 browser
对象上公开了一个 getProcessedConfig()
函数。该文档没有提供足够的信息来说明此功能何时有用:
Get the processed configuration object that is currently being run.
This will contain the specs and capabilities properties of the current
runner instance.
Set by the runner.
getProcessedConfig()
涵盖哪些用例?有人用过吗?为什么?
getProcessedConfig()
允许查看项目中的所有配置值,包括配置和参数。
要轻松地在终端中查看输出,试试这个:
browser.getProcessedConfig().then(console.log);
如果您需要访问配置中的特定值,包括框架参数、multiCapabilities 和选项,processedConfigs 也很有用。我目前正在使用它来访问量角器 config.js 文件中我的 onPrepare() 方法中的配置值。
Protractor 在全局 browser
对象上公开了一个 getProcessedConfig()
函数。该文档没有提供足够的信息来说明此功能何时有用:
Get the processed configuration object that is currently being run. This will contain the specs and capabilities properties of the current runner instance.
Set by the runner.
getProcessedConfig()
涵盖哪些用例?有人用过吗?为什么?
getProcessedConfig()
允许查看项目中的所有配置值,包括配置和参数。 要轻松地在终端中查看输出,试试这个:
browser.getProcessedConfig().then(console.log);
如果您需要访问配置中的特定值,包括框架参数、multiCapabilities 和选项,processedConfigs 也很有用。我目前正在使用它来访问量角器 config.js 文件中我的 onPrepare() 方法中的配置值。