Sha256: dbd8abe3a34238f034baafe74109679cb3f644bfd246c5604843b1835bb2776e

Contents?: true

Size: 590 Bytes

Versions: 3

Compression:

Stored size: 590 Bytes

Contents

module Watir
  class ChildCellLocator < ElementLocator

    def locate_all
      find_all_by_multiple
    end

    private

    def by_id
      nil
    end

    def build_wd_selector(selectors)
      return if selectors.values.any? { |e| e.kind_of? Regexp }

      expressions = %w[./th ./td]
      attr_expr = attribute_expression(selectors)

      unless attr_expr.empty?
        expressions.map! { |e| "#{e}[#{attr_expr}]" }
      end

      xpath = expressions.join(" | ")

      p build_wd_selector: xpath if $DEBUG

      [:xpath, xpath]
    end

  end # ChildCellLocator
end # Watir

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
watir-webdriver-0.9.1 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.9.0 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.8.0 lib/watir-webdriver/locators/child_cell_locator.rb