Class: Ext::TabPanel
- Defined in:
- lib/selenium-extjs/component/Panel.rb
Instance Attribute Summary
Attributes inherited from Panel
Attributes inherited from Component
Instance Method Summary collapse
-
#active_tab=(param) ⇒ Object
def active_tab tab = active_tab().getId() # id = @selenium.get_eval(“window.Ext.getCmp(‘#@id’).getActiveTab().getId()”) p “— active tab —” p id p “?” list = @items.select do |el| p el.getId() el.getId() == id end p list return list.first() end.
Methods inherited from Panel
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
#active_tab=(param) ⇒ Object
def active_tab
tab = active_tab().getId()
# id = @selenium.get_eval(“window.Ext.getCmp(‘#@id’).getActiveTab().getId()”) p “— active tab —” p id
p "?"
list = @items.select do |el|
p el.getId()
el.getId() == id
end
p list
return list.first()
end
41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/selenium-extjs/component/Panel.rb', line 41 def active_tab=(param) if param.is_a? String if param =~ /^ext-/ # wait! else title = param end elsif param.is_a? Integer @selenium.click_at( selector() + "//ul[contains(@class, 'x-tab-strip')]//li[#{param}]//span[contains(@class, 'x-tab-strip-text')]", "0,0") end end |