Sha256: d7fe25ce64b92f8e8b9f608e94ca200455d35de66698f666c31fccffcf7fe4a2

Contents?: true

Size: 1.09 KB

Versions: 26

Compression:

Stored size: 1.09 KB

Contents

module FireWatir
  #
  # Description:
  # Class for Table Cell.
  #
  class TableCell < Element
    attr_accessor :element_name

    # Description:
    #   Locate the table cell element on the page.
    #
    def locate
      case @how
      when :jssh_name
        @element_name = @what
      when :xpath
        @element_name = element_by_xpath(@container, @what)
      else
        @element_name = locate_tagged_element("TD", @how, @what)
      end
      @o = self
    end

    #
    # Description:
    #   Initializes the instance of table cell object.
    #
    # Input:
    #   - how - Attribute to identify the table cell element.
    #   - what - Value of that attribute.
    #
    def initialize(container, how, what)
      @how = how
      @what = what
      @container = container
      #super nil
    end

    alias to_s text

    #
    # Description:
    #   Gets the col span of table cell.
    #
    # Output:
    #   Colspan of table cell.
    #
    def colspan
      assert_exists
      @o.colSpan
    end

  end # TableCell
end # FireWatir

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
firewatir-1.9.4 lib/firewatir/elements/table_cell.rb
firewatir-1.9.3 lib/firewatir/elements/table_cell.rb
firewatir-1.9.2 lib/firewatir/elements/table_cell.rb
firewatir-1.9.2.rc1 lib/firewatir/elements/table_cell.rb
firewatir-1.9.1 lib/firewatir/elements/table_cell.rb
firewatir-1.9.1.rc1 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0.rc7 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0.rc6 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0.rc5 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0.rc4 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0.rc3 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0.rc2 lib/firewatir/elements/table_cell.rb
firewatir-1.9.0.rc1 lib/firewatir/elements/table_cell.rb
firewatir-1.8.1 lib/firewatir/elements/table_cell.rb
firewatir-1.8.1.rc1 lib/firewatir/elements/table_cell.rb
firewatir-1.8.0 lib/firewatir/elements/table_cell.rb
firewatir-1.8.0.rc1 lib/firewatir/elements/table_cell.rb
firewatir-1.7.1 lib/firewatir/elements/table_cell.rb
firewatir-1.7.0 lib/firewatir/elements/table_cell.rb