Tuesday, 27 August 2013

Ruby Page object Gem - Unable to pick a platform for the provided browser (RuntimeError)

Ruby Page object Gem - Unable to pick a platform for the provided browser
(RuntimeError)

I get this error on running my feature file.
Unable to pick a platform for the provided browser (RuntimeError)
Help required, please.
Here is the code;
class GooglePage include PageObject
def self.visitor visit("http://www.google.com") end
end
env.rb
require 'selenium-webdriver' require 'page-object' require 'rubygems'
require 'page-object/page_factory'
World (PageObject::PageFactory) @browser = Selenium::WebDriver.for :firefox
Step-Definitions
require_relative 'GooglePage'
Given(/^I am on the Google home page$/) do
visit(GooglePage) # visit('http://www.google.com')
on(GooglePage).visitor end

No comments:

Post a Comment