Class: Applitools::AppOutput

Inherits:
Object
  • Object
show all
Defined in:
lib/applitools/core/app_output.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(title, screenshot64) ⇒ AppOutput

Returns a new instance of AppOutput.



9
10
11
12
13
# File 'lib/applitools/core/app_output.rb', line 9

def initialize(title, screenshot64)
  @title = title
  @screenshot64 = screenshot64
  @location = Applitools::Location::TOP_LEFT
end

Instance Attribute Details

#dom_urlObject

Returns the value of attribute dom_url.



7
8
9
# File 'lib/applitools/core/app_output.rb', line 7

def dom_url
  @dom_url
end

#locationObject

Returns the value of attribute location.



5
6
7
# File 'lib/applitools/core/app_output.rb', line 5

def location
  @location
end

#screenshot64Object (readonly)

Returns the value of attribute screenshot64.



5
6
7
# File 'lib/applitools/core/app_output.rb', line 5

def screenshot64
  @screenshot64
end

#screenshot_urlObject

Returns the value of attribute screenshot_url.



7
8
9
# File 'lib/applitools/core/app_output.rb', line 7

def screenshot_url
  @screenshot_url
end

#titleObject (readonly)

Returns the value of attribute title.



5
6
7
# File 'lib/applitools/core/app_output.rb', line 5

def title
  @title
end

Instance Method Details

#to_hashObject



20
21
22
23
24
25
26
27
28
29
# File 'lib/applitools/core/app_output.rb', line 20

def to_hash
  result = {
    Title: title,
    Screenshot64: nil,
    Location: location.to_hash,
    ScreenshotUrl: screenshot_url
  }
  result[:DomUrl] = dom_url if dom_url
  result
end