Sha256: 872208db6cc096c1cfdb8c49b73277d0af6592122389a107f82489d3d0de0011
Contents?: true
Size: 721 Bytes
Versions: 1
Compression:
Stored size: 721 Bytes
Contents
require File.dirname(__FILE__) + '/element' class Dropdown_Extjs < Element def click if /parentNode.id/.match(@locator) != nil @locator = @locator.gsub('parentNode.id','childNodes[1].id') @object_id = @selenium.get_eval(@locator) @selenium.click(@object_id) else @selenium.click(@locator) end end def select(text) self.click for wait in 1..60 do begin @selenium.click("//div[contains(@class, 'x-combo-list')]/descendant::div[contains(@class, 'x-combo-list-item')][text()='"+text+"']") break rescue => e sleep(0.5) end end end def type(text) self.click @selenium.type(@locator, text) @selenium.key_press(@locator, "\\9") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
selenium-rspec-dsl-1.0.2 | sites/dropdownExtjs.rb |