Sha256: cdca90e8167a11375935f2fac9e344fa1ecd319b87e06bd1d41730a2595c3f49

Contents?: true

Size: 1.37 KB

Versions: 3

Compression:

Stored size: 1.37 KB

Contents

require 'selenium-connect'
require_relative 'helper'

describe "Firefox" do

  let(:google)  { Google.new(SeleniumConnect.start) }
  let(:quit)    { SeleniumConnect.finish }

  it "blank config" do
    SeleniumConnect.configure do end
    google.visit
    google.page_title.should include("Google")
    quit
  end

  it "localhost" do
    SeleniumConnect.configure do |c|
      c.host  = "localhost"
    end
    google.visit
    google.page_title.should include("Google")
    quit
  end

  it "local jar file specified" do
    SeleniumConnect.configure do |c|
      c.host  = "localhost"
      c.jar   = "#{Dir.pwd}/selenium-server-standalone-2.33.0.jar"
    end
    google.visit
    google.page_title.should include("Google")
    quit
  end

  it "profile name" do
    pending "requires machine setup to run, and need a public example"
    SeleniumConnect.configure do |c|
      c.profile_name  = "YourProfileNameGoesHere"
    end
  end

  it "profile path" do
    pending "need to add a profile to the repo"
    SeleniumConnect.configure do |c|
      c.profile_path  = "#{Dir.pwd}/path/to/profile"
    end
  end

  it "browser path" do
    #example only works on Mac
    SeleniumConnect.configure do |c|
      c.browser = "firefox"
      c.browser_path = "/Applications/Firefox.app/Contents/MacOS/firefox"
    end
    google.visit
    google.page_title.should include("Google")
    quit
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
selenium-connect-1.9.3 spec/acceptance/firefox_spec.rb
selenium-connect-1.9.1 spec/acceptance/firefox_spec.rb
selenium-connect-1.9.0 spec/acceptance/firefox_spec.rb