lib/cello/structure/browser.rb in cello-0.0.17 vs lib/cello/structure/browser.rb in cello-0.0.19

- old
+ new

@@ -1,23 +1,20 @@ require "rubygems" require "watir-webdriver" -require "headless" module Cello module Structure class Browser attr_accessor :context attr_reader :browser def initialize(browser) - @headless = Headless.new - @headless.start @browser = Watir::Browser.new browser end def visit - @browser.goto @context.get_url + @context.visit end def context(page) @context = page.new(@browser) end @@ -26,10 +23,9 @@ @browser.text.include? text end def close @browser.close - @headless.destroy end def get_screenshot @browser.driver.save_screenshot 'screenshot.png' end