Skip to content

Instantly share code, notes, and snippets.

@EvanAgee
Created May 6, 2014 17:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EvanAgee/177509fd9609dff8711f to your computer and use it in GitHub Desktop.
Save EvanAgee/177509fd9609dff8711f to your computer and use it in GitHub Desktop.
Example Behat feature for testing element existence
Feature: Home Page Tests
As an anonymous user
I should see a set of tabs that display the conference sponsors
I should see a large rotating banner
I should see the home page video
I should be able to click the Register Now Button
@javascript @api
Scenario: Checking that important elements have rendered
Given I am not logged in
When I visit "/"
Then the element "div[id=views_slideshow_cycle_main_sliding_banners-sliding_banner]" should exist
Then the element "div[id=tabset]" should exist
Then the element "a[class=speaker]" should exist
Then "div[id=register-block]" should be visible
Then the element "div[id=mediafront_nodeplayer_default]" should exist
When I click "Register Now for 2014"
Then the response should contain "Brushfire"
Then print current URL
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment