Sha256: 4323fb04fd4d230406a7d5685f966f99618beefa6823362375c7446f48097632

Contents?: true

Size: 262 Bytes

Versions: 4

Compression:

Stored size: 262 Bytes

Contents

# frozen_string_literal: true

require 'nokogiri'

module Watir
  class Browser
    def text
      doc = Nokogiri::HTML(body(index: 0).html)
      doc.css('script').remove # encoding bug in older libxml?

      doc.inner_text
    end
  end # Browser
end # Watir

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
watir-7.3.0 lib/watir/extensions/nokogiri.rb
watir-7.2.2 lib/watir/extensions/nokogiri.rb
watir-7.2.1 lib/watir/extensions/nokogiri.rb
watir-7.2.0 lib/watir/extensions/nokogiri.rb