Sha256: 01259b02b265fd1f67a5d0b018acad9b0fd30c1f2a1aaccd505120b11a3eedde

Contents?: true

Size: 593 Bytes

Versions: 18

Compression:

Stored size: 593 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

18 entries across 18 versions & 1 rubygems

Version Path
watir-webdriver-0.7.0 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.11 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.10 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.9 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.8 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.7 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.6 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.5 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.4 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.3 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.2 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.1 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.6.0 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.5.8 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.5.7 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.5.6 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.5.5 lib/watir-webdriver/locators/child_cell_locator.rb
watir-webdriver-0.5.4 lib/watir-webdriver/locators/child_cell_locator.rb