Last active
May 26, 2018 00:06
-
-
Save danascheider/6f57d9722bf89f9d2f1afd7fd6bdfcaf to your computer and use it in GitHub Desktop.
Cucumber Ruby Core Issue #153
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is found in the features/support directory | |
require "watir" | |
require "webdrivers" | |
require "cucumber" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source "https://rubygems.org" | |
ruby "2.4.0" | |
gem "cucumber", "3.1.0" | |
gem "watir" | |
gem "webdrivers" | |
gem "byebug" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GEM | |
remote: https://rubygems.org/ | |
specs: | |
backports (3.11.3) | |
builder (3.2.3) | |
byebug (10.0.2) | |
childprocess (0.9.0) | |
ffi (~> 1.0, >= 1.0.11) | |
cucumber (3.1.0) | |
builder (>= 2.1.2) | |
cucumber-core (~> 3.1.0) | |
cucumber-expressions (~> 5.0.4) | |
cucumber-wire (~> 0.0.1) | |
diff-lcs (~> 1.3) | |
gherkin (~> 5.0) | |
multi_json (>= 1.7.5, < 2.0) | |
multi_test (>= 0.1.2) | |
cucumber-core (3.1.0) | |
backports (>= 3.8.0) | |
cucumber-tag_expressions (~> 1.1.0) | |
gherkin (>= 5.0.0) | |
cucumber-expressions (5.0.18) | |
cucumber-tag_expressions (1.1.1) | |
cucumber-wire (0.0.1) | |
diff-lcs (1.3) | |
ffi (1.9.23) | |
gherkin (5.0.0) | |
mini_portile2 (2.3.0) | |
multi_json (1.13.1) | |
multi_test (0.1.2) | |
nokogiri (1.8.2) | |
mini_portile2 (~> 2.3.0) | |
rubyzip (1.2.1) | |
selenium-webdriver (3.12.0) | |
childprocess (~> 0.5) | |
rubyzip (~> 1.2) | |
watir (6.11.0) | |
selenium-webdriver (~> 3.4, >= 3.4.1) | |
webdrivers (3.3.1) | |
nokogiri (~> 1.6) | |
rubyzip (~> 1.0) | |
selenium-webdriver (~> 3.0) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
byebug | |
cucumber (= 3.1.0) | |
watir | |
webdrivers | |
RUBY VERSION | |
ruby 2.4.0p0 | |
BUNDLED WITH | |
1.16.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is found in the features directory | |
Feature: Figure out issue 153 | |
Scenario: Search for something | |
Given I have entered "foo" into the query | |
When I click "Google Search" | |
Then I should see some results |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is found in the features/step_definitions directory | |
Given /^I have entered "([^"]*)" into the query$/ do |term| | |
@browser ||= Watir::Browser.new :firefox | |
@browser.goto "google.com" | |
@browser.text_field(:name => "q").set term | |
end | |
When /^I click "([^"]*)"$/ do |button_name| | |
@browser.button.click | |
end | |
Then /^I should see some results$/ do | |
@browser.div(:id => "resultStats").wait_until_present | |
@browser.div(:id => "resultStats").should exist | |
@browser.close | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment