js.share.srctree.code.string-code.js Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sahagin Show documentation
Show all versions of sahagin Show documentation
Sahagin makes your Selenium script more readable and maintainable.
/**
* @class
*/
sahagin.StringCode = function() {
sahagin.base(this);
/**
* @private
* @type {string}
*/
this.value = null;
};
sahagin.inherits(sahagin.StringCode, sahagin.Code);
/**
* @type {string}
*/
sahagin.StringCode.TYPE = "string";
/**
* @returns {string}
*/
sahagin.StringCode.prototype.getValue = function() {
return this.value;
};
/**
* @param {string} value
*/
sahagin.StringCode.prototype.setValue = function(value) {
this.value = value;
};
/**
* @returns {string}
*/
sahagin.StringCode.prototype.getType = function() {
return sahagin.StringCode.TYPE;
};
/**
* @returns {Object.}
*/
sahagin.StringCode.prototype.toYamlObject = function() {
var result = sahagin.base(this, 'toYamlObject');
result['value'] = this.value;
return result;
};
/**
* @param {Object.} yamlObject
*/
sahagin.StringCode.prototype.fromYamlObject = function(yamlObject) {
sahagin.base(this, 'fromYamlObject', yamlObject);
this.value = sahagin.YamlUtils.getStrValue(yamlObject, 'value');
};