Class: PhantomJS
- Inherits:
-
Object
- Object
- PhantomJS
- Defined in:
- lib/testnow/phantomjs.rb
Instance Method Summary collapse
Instance Method Details
#launch_driver_phantomjs ⇒ Object
10 11 12 13 14 |
# File 'lib/testnow/phantomjs.rb', line 10 def launch_driver_phantomjs driver = Selenium::WebDriver.for(:phantomjs) self.post_config(driver) return driver end |
#launch_watir_phantomjs ⇒ Object
16 17 18 19 20 |
# File 'lib/testnow/phantomjs.rb', line 16 def launch_watir_phantomjs browser = Watir::Browser.new(:phantomjs) self.post_config(browser.driver) return browser end |
#post_config(driver) ⇒ Object
4 5 6 7 8 |
# File 'lib/testnow/phantomjs.rb', line 4 def post_config(driver) driver.manage.timeouts.implicit_wait = 30 driver.manage.timeouts.page_load = 120 driver.manage.window.maximize end |