Class: Applitools::Calabash::FullPageCaptureAlgorithm::Base

Inherits:
Object
  • Object
show all
Extended by:
Helpers, Forwardable
Defined in:
lib/applitools/calabash/full_page_capture_algorithm/base.rb

Direct Known Subclasses

AndroidScrollView, IosUITableView

Constant Summary collapse

DEFAULT_SLEEP_INTERVAL =
1

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Helpers

abstract_attr_accessor, abstract_method, env_variable, environment_attribute, environment_variables

Constructor Details

#initialize(screenshot_provider, element, options = {}) ⇒ Base

Returns a new instance of Base.



15
16
17
18
19
20
21
22
23
24
25
26
27
# File 'lib/applitools/calabash/full_page_capture_algorithm/base.rb', line 15

def initialize(screenshot_provider, element, options = {})
  Applitools::ArgumentGuard.is_a?(element, 'element', Applitools::Calabash::CalabashElement)
  @screenshot_provider = screenshot_provider
  @element = element
  @context = screenshot_provider.context
  return unless options[:debug_screenshot_provider]
  Applitools::ArgumentGuard.is_a?(
    options[:debug_screenshot_provider],
    'options[:debug_screenshot_provider]',
    Applitools::DebugScreenshotProvider
  )
  @debug_screenshot_provider = options[:debug_screenshot_provider]
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



11
12
13
# File 'lib/applitools/calabash/full_page_capture_algorithm/base.rb', line 11

def context
  @context
end

#debug_screenshot_providerObject (readonly)

Returns the value of attribute debug_screenshot_provider.



11
12
13
# File 'lib/applitools/calabash/full_page_capture_algorithm/base.rb', line 11

def debug_screenshot_provider
  @debug_screenshot_provider
end

#elementObject (readonly)

Returns the value of attribute element.



11
12
13
# File 'lib/applitools/calabash/full_page_capture_algorithm/base.rb', line 11

def element
  @element
end

#screenshot_providerObject (readonly)

Returns the value of attribute screenshot_provider.



11
12
13
# File 'lib/applitools/calabash/full_page_capture_algorithm/base.rb', line 11

def screenshot_provider
  @screenshot_provider
end

#stitched_imageObject (readonly)

Returns the value of attribute stitched_image.



11
12
13
# File 'lib/applitools/calabash/full_page_capture_algorithm/base.rb', line 11

def stitched_image
  @stitched_image
end