Sha256: 6a2c6692a2b6bf3c9f8ed4ec43b39ecd99b251f762be17eb7876d4680edbe365

Contents?: true

Size: 662 Bytes

Versions: 1

Compression:

Stored size: 662 Bytes

Contents

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

# Basic Dropdown object.
# Subclass of Element.
class Dropdown < Element
    # Selects provided text value in object; based on option label
    def select(text)
	@selenium.select(@locator,"label=#{text}")
    end
    
    # Selects provided text value in object; based on option index
    def selectIndex(text)
        @selenium.select(@locator,"index=#{text}")
    end
    
    # Selects provided text value in object; based on option value
    def selectValue(text)
        @selenium.select(@locator,"value=#{text}")
    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/dropdown.rb