Sha256: 9d2960ef6c1f0895fd0ab6e61f7d463e4557c479fec286ecb52e7658bcf63097

Contents?: true

Size: 354 Bytes

Versions: 5

Compression:

Stored size: 354 Bytes

Contents

# see https://webrat.lighthouseapp.com/projects/10503/tickets/153-within-should-support-xpath

Gem.patching('webrat', '0.7.2') do
  Webrat::Scope.class_eval do
    def scoped_dom
      if @selector =~ /^\.?\/\/?/
        @scope.dom.xpath(@selector).first
      else
        @scope.dom.css(@selector).first
      end
    end
  end
end if defined?(Webrat)

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
adva-core-0.0.9 lib/patches/webrat/within_xpath.rb
adva-core-0.0.8 lib/patches/webrat/within_xpath.rb
adva-core-0.0.7 lib/patches/webrat/within_xpath.rb
adva-core-0.0.6 lib/patches/webrat/within_xpath.rb
adva-core-0.0.5 lib/patches/webrat/within_xpath.rb