Created
December 4, 2010 20:03
-
-
Save jmaicher/728441 to your computer and use it in GitHub Desktop.
Using Selenium with Cucumber and Fakeweb
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
# cucumber supports selenium by default, just mark features with @selenium tag | |
@selenium | |
Feature: This feature will be executed with selenium | |
... |
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
# if you're using fakeweb, then you will get an error like the following | |
Real HTTP connections are disabled. Unregistered request: GET http://127.0.0.1:54602/__identify__ (FakeWeb::NetConnectNotAllowedError) |
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
# this is because selenium runs the application on a different server. We need to tell fakeweb to allow those connections to localhost | |
# just put this to features/support/env.rb to enable connections to localhost | |
FakeWeb.allow_net_connect = %r[^https?://(localhost|127.0.0.1)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment