code: function parse_locator(locator)
  {
      var result = locator.match(/^([A-Za-z]+)=.+/);
      if (result) {
          var type = result[1].toLowerCase();
          var actualLocator = locator.substring(type.length + 1);
          return { type: type, string: actualLocator };
      }
      return { type: 'implicit', string: locator };
  }
docs: ****************************************************************************** Locator evaluation support 
  Parses a Selenium locator, returning its type and the unprefixed locator
  string as an object.
  
  @param locator  the locator to parse