diff --git a/Gemfile b/Gemfile index 3b7d0b0..1a7f193 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,5 @@ gem 'rake' gem 'selenium-webdriver' gem 'syntax' gem 'watir-webdriver' -gem 'watir-webdriver-performance' \ No newline at end of file +gem 'watir-webdriver-performance' +gem 'page-object' \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 3fef058..1a68732 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,16 +11,28 @@ GEM gherkin (~> 2.12) multi_json (>= 1.7.5, < 2.0) multi_test (>= 0.1.1) + data_magic (0.21) + faker (>= 1.1.2) + yml_reader (>= 0.4) diff-lcs (1.2.5) + faker (1.5.0) + i18n (~> 0.5) ffi (1.9.3) gherkin (2.12.2) multi_json (~> 1.3) headless (1.0.2) + i18n (0.7.0) mini_portile (0.5.3) multi_json (1.10.1) multi_test (0.1.1) nokogiri (1.6.1) mini_portile (~> 0.5.0) + page-object (1.0.2) + page_navigation (>= 0.9) + selenium-webdriver (>= 2.42.0) + watir-webdriver (>= 0.6.9) + page_navigation (0.9) + data_magic (>= 0.14) rake (10.3.2) rubyzip (1.1.6) selenium-webdriver (2.42.0) @@ -35,6 +47,7 @@ GEM watir-webdriver watir-webdriver websocket (1.0.7) + yml_reader (0.5) PLATFORMS ruby @@ -45,6 +58,7 @@ DEPENDENCIES cucumber headless nokogiri + page-object rake selenium-webdriver syntax diff --git a/features/support/urls.rb b/features/support/urls.rb index 38fc1b9..0ae922b 100644 --- a/features/support/urls.rb +++ b/features/support/urls.rb @@ -22,9 +22,11 @@ def path_to(page_name) case page_name when /the desktop home page/i base_url + when /the duckduckgo home page/i + base_url="http://duckduckgo.com" else - raise "Can't find mapping from \"#{page_name}\" to a path.\n" + - "Now, go and add a mapping in #{__FILE__}" + raise "Can't find mapping from \"#{page_name}\" to a url.\n" + + "Please add a mapping in #{__FILE__}" end end