Sha256: 4c23db04da2f267c608701aa244d2630d0d9d8abf1a202cae7168535e5660b11

Contents?: true

Size: 1002 Bytes

Versions: 1

Compression:

Stored size: 1002 Bytes

Contents

require File.dirname(__FILE__) + '/element'

class Dropdown_JQuery < Element
    
    def select(text)
	@selenium.select(@locator,"label=#{text}")
	begin
	  @selenium.wait_for_condition('selenium.browserbot.getCurrentWindow().jQuery.active == 0', 10000)
	rescue => e
	  #continue
	end
	sleep(4)
    end
    
        # Selects provided text value in object; based on option index
    def selectIndex(text)
        @selenium.select(@locator,"index=#{text}")
	begin
	  @selenium.wait_for_condition('selenium.browserbot.getCurrentWindow().jQuery.active == 0', 10000)
	rescue => e
	  #continue
	end
	sleep(4)
    end
    
    # Selects provided text value in object; based on option value
    def selectValue(text)
        @selenium.select(@locator,"value=#{text}")
	begin
	  @selenium.wait_for_condition('selenium.browserbot.getCurrentWindow().jQuery.active == 0', 10000)
	rescue => e
	  #continue
	end
	sleep(4)
    end
    
    def selectedText
	return @selenium.get_selected_label(@locator)	
    end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
selenium-rspec-dsl-1.0.2 sites/dropdownJQuery.rb