Class: Webdriver::Window
- Inherits:
-
Object
- Object
- Webdriver::Window
- Defined in:
- lib/webdriver/window.rb
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
-
#initialize(id, connection) ⇒ Window
constructor
A new instance of Window.
- #maximize ⇒ Object
- #minimize ⇒ Object
- #rect ⇒ Object
Constructor Details
#initialize(id, connection) ⇒ Window
Returns a new instance of Window.
4 5 6 7 |
# File 'lib/webdriver/window.rb', line 4 def initialize(id, connection) @id = id @connection = Webdriver::PrefixConnection.new "window", connection end |
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
3 4 5 |
# File 'lib/webdriver/window.rb', line 3 def id @id end |
Instance Method Details
#maximize ⇒ Object
9 10 11 12 |
# File 'lib/webdriver/window.rb', line 9 def maximize @connection.post "maximize" self end |
#minimize ⇒ Object
14 15 16 17 |
# File 'lib/webdriver/window.rb', line 14 def minimize @connection.post "minimize" self end |
#rect ⇒ Object
19 20 21 |
# File 'lib/webdriver/window.rb', line 19 def rect @connection.get "rect" end |