Sha256: fcabadb757264b52c0c01d0b1151fdeb9a9566ea4cf7d4c126c3cf5ee60fda80

Contents?: true

Size: 459 Bytes

Versions: 1

Compression:

Stored size: 459 Bytes

Contents

module Prickle
  module Capybara
    class ElementNotFound < Exception

      def initialize type, identifier, text, e
        element_text = "Element"
        element_text = "\e[1m#{type}\e[0m\e[31m" unless type == "*"
        text_string = " and text \e[1m#{text}\e[0m\e[31m" unless text.nil?

        raise "#{element_text} with properties \e[1m#{identifier.to_s}\e[0m\e[31m#{text_string} was not found.\nError: #{e.message}"
      end

    end

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prickle-0.0.1 lib/prickle/capybara/exceptions.rb