Class: Applitools::ScreenshotTaker
- Inherits:
-
Object
- Object
- Applitools::ScreenshotTaker
- Includes:
- HTTParty
- Defined in:
- lib/eyes_selenium/eyes/screenshot_taker.rb
Instance Attribute Summary collapse
-
#driver_server_uri ⇒ Object
readonly
Returns the value of attribute driver_server_uri.
-
#driver_session_id ⇒ Object
readonly
Returns the value of attribute driver_session_id.
Instance Method Summary collapse
-
#initialize(driver_server_uri, driver_session_id) ⇒ ScreenshotTaker
constructor
A new instance of ScreenshotTaker.
- #screenshot ⇒ Object
Constructor Details
#initialize(driver_server_uri, driver_session_id) ⇒ ScreenshotTaker
Returns a new instance of ScreenshotTaker.
9 10 11 12 |
# File 'lib/eyes_selenium/eyes/screenshot_taker.rb', line 9 def initialize(driver_server_uri, driver_session_id) @driver_server_uri = driver_server_uri @driver_session_id = driver_session_id end |
Instance Attribute Details
#driver_server_uri ⇒ Object (readonly)
Returns the value of attribute driver_server_uri.
7 8 9 |
# File 'lib/eyes_selenium/eyes/screenshot_taker.rb', line 7 def driver_server_uri @driver_server_uri end |
#driver_session_id ⇒ Object (readonly)
Returns the value of attribute driver_session_id.
7 8 9 |
# File 'lib/eyes_selenium/eyes/screenshot_taker.rb', line 7 def driver_session_id @driver_session_id end |
Instance Method Details
#screenshot ⇒ Object
14 15 16 17 |
# File 'lib/eyes_selenium/eyes/screenshot_taker.rb', line 14 def screenshot res = self.class.get(driver_server_uri.to_s.gsub(/\/$/,"") + "/session/#{driver_session_id}/screenshot") res.parsed_response['value'] end |