Created
May 1, 2012 09:42
-
-
Save nickboyce/2566849 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
context "searching" do | |
before(:all) do | |
@driver.navigate.to "http://www.easyart.com" | |
# find <input name="searchquery"> | |
@driver.find_element(name: "searchquery").send_keys("cheese") | |
# find <input id="search-button"> and click it | |
@driver.find_element(id: "search-button").click | |
# wait until the title starts with "cheese" | |
@wait.until { @driver.find_element(tag_name: "h1").text.downcase.start_with? "cheese" } | |
end | |
it "should be able to search for cheese prints" do | |
# check the title of the page | |
@driver.find_element(tag_name: "h1").text.should == "cheese art prints and posters" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment