Class: Statt::Client
- Inherits:
-
Object
- Object
- Statt::Client
- Defined in:
- lib/statt/client.rb
Instance Attribute Summary collapse
-
#selenium_driver ⇒ Object
readonly
Returns the value of attribute selenium_driver.
Instance Method Summary collapse
-
#initialize ⇒ Client
constructor
A new instance of Client.
- #test ⇒ Object
Constructor Details
#initialize ⇒ Client
Returns a new instance of Client.
10 11 12 13 14 15 16 17 |
# File 'lib/statt/client.rb', line 10 def initialize @selenium_driver = Selenium::Client::Driver.new \ :host => "localhost", :port => 4444, :browser => "*firefox", :url => "http://www.google.com", :timeout_in_second => 60 end |
Instance Attribute Details
#selenium_driver ⇒ Object (readonly)
Returns the value of attribute selenium_driver.
9 10 11 |
# File 'lib/statt/client.rb', line 9 def selenium_driver @selenium_driver end |
Instance Method Details
#test ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/statt/client.rb', line 19 def test @selenium_driver.start_new_browser_session @selenium_driver.open "/" @selenium_driver.type "q", "Selenium seleniumhq" @selenium_driver.click "btnG", :wait_for => :page_to_load @selenium_driver.close_current_browser_session end |