Sha256: 8881193a686ccc2e38657bc525d15bcee3478fe9d41382c7fb9e4974d8d9ad7e

Contents?: true

Size: 767 Bytes

Versions: 1

Compression:

Stored size: 767 Bytes

Contents

module Fluent
  module WebElements
    class WebElement
      
      attr_reader :web_element
      
      def initialize(web_element, platform)
        @web_element = web_element
        include_platform_specifics_for platform
      end
      
      def click
        web_element.click
      end
      
      def enabled?
        web_element.enabled?
      end
      
      def disabled?
        not enabled?
      end
      
      def include_platform_specifics_for(platform)
        if platform[:platform] == :watir_webdriver
          require 'fluent/platform_watir/platform_web_elements/web_element'
          self.class.send :include, ::Fluent::Platforms::WatirWebDriver::WebElement
        end
      end
      
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fluent-0.1.0 lib/fluent/web_elements/web_element.rb