Class: EasyAutomation::RemoteServer
- Inherits:
-
Object
- Object
- EasyAutomation::RemoteServer
- Defined in:
- lib/easy_automation/remote_server.rb
Instance Method Summary collapse
- #driver(browser_start_command, browser_url, port, timeout) ⇒ Object
- #open(browser_start_command, browser_url) ⇒ Object
- #start ⇒ Object
- #stop ⇒ Object
Instance Method Details
#driver(browser_start_command, browser_url, port, timeout) ⇒ Object
3 4 5 |
# File 'lib/easy_automation/remote_server.rb', line 3 def driver(browser_start_command, browser_url, port, timeout) ::Selenium::SeleniumDriver.new('localhost', port, browser_start_command, browser_url, timeout * 1000) end |
#open(browser_start_command, browser_url) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/easy_automation/remote_server.rb', line 7 def open(browser_start_command, browser_url) url = URI.parse(browser_url) browser = driver(browser_start_command, URI::Generic::new(url.scheme, url.userinfo, url.host, url.port, nil, nil, nil, nil, nil), Runner.configuration.selenium_port, Runner.configuration.selenium_timeout) browser.start browser.open(url.request_uri) page = ::Selenium::WebPage.new(browser) page.wait_for_load page end |
#start ⇒ Object
20 21 |
# File 'lib/easy_automation/remote_server.rb', line 20 def start end |
#stop ⇒ Object
23 24 |
# File 'lib/easy_automation/remote_server.rb', line 23 def stop end |