Class: Browserly::Screenshot
- Inherits:
-
Object
- Object
- Browserly::Screenshot
- Extended by:
- Comandor
- Defined in:
- lib/browserly/screenshot.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
Instance Method Summary collapse
- #driver ⇒ Object
-
#initialize(url, height_selector = '') ⇒ Screenshot
constructor
A new instance of Screenshot.
- #perform ⇒ Object
Constructor Details
#initialize(url, height_selector = '') ⇒ Screenshot
Returns a new instance of Screenshot.
8 9 10 11 |
# File 'lib/browserly/screenshot.rb', line 8 def initialize(url, height_selector = '') @url = url @height_selector = height_selector end |
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file.
6 7 8 |
# File 'lib/browserly/screenshot.rb', line 6 def file @file end |
Instance Method Details
#driver ⇒ Object
17 18 19 |
# File 'lib/browserly/screenshot.rb', line 17 def driver @driver ||= Browserly::Driver.new(Browserly.configuration.remote_driver, Browserly.configuration.chrome_args).driver end |
#perform ⇒ Object
13 14 15 |
# File 'lib/browserly/screenshot.rb', line 13 def perform take! && close_session! end |