Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
var deprecationNotice = function(propertyName, newSettingName) {
ErrorHandler.logWarning('DEPRECATION NOTICE: Property ' + propertyName + ' is deprecated since v0.5. Please' +
' use the "cli_args" object on the "selenium" property to define "' + newSettingName + '". E.g.:');
var demoObj = '{\n' +
' "cli_args": {\n' +
' "'+ Logger.colors.yellow(newSettingName) +'": ""\n' +
' }\n' +
'}';
console.log(demoObj, '\n');
};
if (this.test_settings.firefox_profile) {
deprecationNotice('firefox_profile', 'webdriver.firefox.profile');
this.settings.selenium.cli_args['webdriver.firefox.profile'] = this.test_settings.firefox_profile;
}
if (this.test_settings.chrome_driver) {
deprecationNotice('chrome_driver', 'webdriver.chrome.driver');
this.settings.selenium.cli_args['webdriver.chrome.driver'] = this.test_settings.chrome_driver;
}
if (this.test_settings.ie_driver) {
deprecationNotice('ie_driver', 'webdriver.ie.driver');
this.settings.selenium.cli_args['webdriver.ie.driver'] = this.test_settings.ie_driver;
}
return this;
},