Class: Ext::Combo

Inherits:
Field show all
Defined in:
lib/selenium-extjs/component/Combo.rb

Instance Attribute Summary

Attributes inherited from Component

#parent

Instance Method Summary collapse

Methods inherited from Component

#getId, #highlight, #init_component, #initialize, #method_missing, #node, #selector, #wait_for_ajax

Constructor Details

This class inherits a constructor from Ext::Component

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Ext::Component

Instance Method Details

#blurObject



10
11
12
# File 'lib/selenium-extjs/component/Combo.rb', line 10

def blur
  @selenium.fire_event(@id, "blur")
end

#valueObject



14
15
16
17
18
19
# File 'lib/selenium-extjs/component/Combo.rb', line 14

def value
  # xpath or Ext?
  # TODO: get more information from field (textarea or input[type=text])
  @selenium.get_value(@id) #{}"//div[@id='#{@id}']//input")
  # return @selenium.get_eval("window.Ext.getCmp('#{@id}').getValue()");
end

#value=(v) ⇒ Object



5
6
7
8
# File 'lib/selenium-extjs/component/Combo.rb', line 5

def value= (v)
  @selenium.type(@id, v)
  blur
end