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
require 'capybara' | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
session = Capybara::Session.new(:selenium, app) | |
session.visit("/") | |
session.find('input[name=test]').set(false) | |
puts session.find('input[name=test]').value # returns 'on', regardless of whether true or false was set at previous row |
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
require 'capybara' | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
session = Capybara::Session.new(:selenium, app) | |
session.visit("/") | |
session.select("Alaska", :from => "last_address_used[state]") # works OK | |
__END__ |
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
require 'capybara' | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
session = Capybara::Session.new(:selenium, app) | |
session.visit("/") | |
session.select("52", :from => "answer_sheet_test_prep_number") # element is selected properly | |
__END__ |
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
require 'capybara' | |
require 'capybara-webkit' | |
html = DATA.read | |
app = proc { |env| [200, { "Content-Type" => "text/html" }, [html] ] } | |
Capybara.ignore_hidden_elements = true | |
session = Capybara::Session.new(:selenium, app) | |
session.visit("/") |
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
Feature: Test feature | |
Background: | |
Given I do something | |
Scenario: Test Scenario | |
Given I do something | |
When I do something | |
Then I do something | |
And I do something |
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
<form accept-charset="UTF-8" action="/submissions/1/reviews/4" class="simple_form edit_review" id="edit_review_4" method="post" novalidate="novalidate" name="edit_review_4"> | |
<div style="margin:0;padding:0;display:inline"> | |
<input name="utf8" type="hidden" value="✓"> | |
<input name="_method" type="hidden" value="put"><input name="authenticity_token" type="hidden" value="gJ/KKAodeIJD8PPnRNeN4GaGb/yqvUDHrsnl9LqLP/c="> | |
</div> | |
<div class="input integer optional"> | |
<label class="integer optional control-label" for="review_rating">Rating</label><input class="numeric integer optional" id="review_rating" name="review[rating]" step="1" type="number" value="33"> | |
</div> |
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
<table> | |
<tr> | |
<td>Sara</td> | |
<td>2.3</td> | |
<td>4.3</td> | |
</tr> | |
<tr> | |
<td>Mike</td> | |
<td>4.5</td> | |
<td>1.1</td> |
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
module Summary | |
extend Helper | |
def self.check_block(block_name) | |
# do something | |
end | |
end |
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
Feature: Shipping costs | |
Scenario Outline: Calculate GST status and shipping rate | |
Given the customer <is> from Australia | |
When the customer buys <how_much> | |
Then the customer <GST_or_free_shipping> | |
Examples: | |
| is | how_much | GST_or_free_shipping | | |
| is | something | pays GST | |
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
Feature: Shipping costs | |
Scenario Outline: Paying GST | |
Given the customer <is> from Australia | |
When the customer buys something | |
Then the customer <pays> GST | |
Examples: | |
| is | pays | | |
| is | pays | |