在firefox中安装selenium插件自定义rsel后缀文件

在firefox中安装selenium IDE

1、下载selenium IDE插件

2、在firefox的tools下点击selenium IDE

3、选择Options下的options,点击Formats,点击add按钮,添加rsel

4、将rsel的source粘贴为

/*
 * Selenium on Rails RSelenese format for Selenium IDE
 * 
 * Written by Shinya Kasatani (kasatani at gmail.com)
 */

load('formatCommandOnlyAdapter.js');

function string(value) {
	if (value != null) {
		value = value.replace(/\\/g, '\\\\');
		value = value.replace(/\"/g, '\\"');
		value = value.replace(/\r/g, '\\r');
		value = value.replace(/\n/g, '\\n');
		return '"' + value + '"';
	} else {
		return '""';
	}
}

function underscore(text) {
	return text.replace(/[A-Z]/g, function(str) {
			return '_' + str.toLowerCase();
		});
}

function formatCommand(command) {
	var line = underscore(command.command);
	if (command.target) {
		line += ' ' + string(command.target);
		if (command.value) {
			line += ', ' + string(command.value);
		}
	}
	return line;
}

this.playable = false;

你可能感兴趣的:(ide,Rails,Gmail,firefox)