11/24/2011

Disable Information bar in Internet Explorer browser


Information bar in IE browser disturbs us so much. Moreover, we cannot run automation test if this feature is enable. Below steps guide us how to disable it.

  1. Run regedit.exe to edit registry
  2. HKEY_CURRENT_USER\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWNSet the REG_DWORD for iexplorer.exe to a value of 0 to disable LMZ Lockdown
  3. HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN
  4. Set the REG_DWORD for the following to a value of 0 to disable LMZ Lockdown


  • explorer.exe REG_DWORD Value 0
  • iexplorer.exe REG_DWORD Value 0
  • msimn.exe REG_DWORD Value 0
  • wmplayer.exe REG_DWORD Value 0

11/14/2011

Creates GUI Map file from Selenium IDE

1. Open Selenium IDE Options
2. In the [Formats] tab, clicks [Add] button
3. Name the format as GUI Map
4. Replace the source code by below code
5. Click [Save]  button
6. Record some steps by Selenium IDE
7. Rename the command to Object Name format
8. On Selenium IDE, click File>>Export Test Case As >> GUI Map



var SEPARATORS = {
    comma: ",",
    tab: "\t"
};

function formatCommands(commands) {

    var sep = SEPARATORS[options['separator']];
    var result = 'Property ' + sep + 'Value' + "\n";
    for (var i = 0; i < commands.length; i++) {
        var command = commands[i];
        if (command.type == 'command') {
            result += command.command + sep + command.target + sep + command.value + "\n";
        }
    }
    return result;
}

function parse(testCase, source) {
    var doc = source;
    var commands = [];
    var sep = SEPARATORS[options['separator']];
    while (doc.length > 0) {
        var line = /(.*)(\r\n|[\r\n])?/.exec(doc);
        var array = line[1].split(sep);
        if (array.length >= 3) {
            var command = new Command();
            command.command = array[0];
            command.target = array[1];
            command.value = array[2];
            commands.push(command);
        }
        doc = doc.substr(line[0].length);
    }
    testCase.setCommands(commands);
}

function format(testCase, name) {
    return formatCommands(testCase.commands);
}

options = { separator: 'comma' };


configForm =
    '<description>Separator</description>' +
 '<menulist id="options_separator">' +
 '<menupopup>' +
 '<menuitem label="Comma" value="comma"/>' +
 '<menuitem label="Tab" value="tab"/>' +
 '</menupopup>' +
 '</menulist>';