def enter_text_with_id(textfield_id, value, opts = {})
      # For IE10, it seems unable to identify HTML5 elements
      #
      # However for IE10, the '.' is omitted.
      if opts.nil? || opts.empty?
        # for Watir, default is clear 
        opts[:appending] = false
      end
      
      perform_operation {
        
        begin
          text_field(:id, textfield_id).set(value)
        rescue => e
          # However, this approach is not reliable with Watir (IE)
          # for example, for entering email, the dot cannot be entered, try ["a@b", :decimal, "com"]
          the_elem = element(:xpath, "//input[@id='#{textfield_id}']")        
          the_elem.send_keys(:clear) unless opts[:appending]        
          the_elem.send_keys(value)        
        end
      }
    end
def enter_text_with_id(textfield_id, value, opts = {})
      # For IE10, it seems unable to identify HTML5 elements
      #
      # However for IE10, the '.' is omitted.
      if opts.nil? || opts.empty?
        # for Watir, default is clear 
        opts[:appending] = false
      end
      
      perform_operation {
        
        begin
          text_field(:id, textfield_id).set(value)
        rescue => e
          # However, this approach is not reliable with Watir (IE)
          # for example, for entering email, the dot cannot be entered, try ["a@b", :decimal, "com"]
          the_elem = element(:xpath, "//input[@id='#{textfield_id}']")        
          the_elem.send_keys(:clear) unless opts[:appending]        
          the_elem.send_keys(value)        
        end
      }
    end
for text field can be easier to be identified by attribute "id" instead of "name", not recommended though

 params opts takes :appending => true or false, if true, won't clear the text field.