1
0
Fork 0
mirror of https://github.com/teampoltergeist/poltergeist.git synced 2022-11-09 12:05:00 -05:00

Update README to include URL blacklisting [ci skip]

This commit is contained in:
Adam Conrad 2015-02-12 14:34:47 -05:00 committed by Dmitry Vorotilin
parent f826d135dd
commit de1e49ff34

View file

@ -266,6 +266,20 @@ end
* `:port` (Fixnum) - The port which should be used to communicate
with the PhantomJS process. Defaults to a random open port.
### URL Blacklisting ###
The latest version of Poltergeist supports URL blacklisting, which allows you
to prevent scripts from running on designated domains. If you are experiencing
slower run times, consider creating a URL blacklist of domains that are not
essential to your testing environment, such as ad networks or analytics.
```ruby
page.driver.browser.url_blacklist = ['http://www.example.com']
```
Make sure you set it before each running test, because this setting's cleaned
up when capybara does reset.
## Troubleshooting ##
Unfortunately, the nature of full-stack testing is that things can and