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:
parent
f826d135dd
commit
de1e49ff34
1 changed files with 14 additions and 0 deletions
14
README.md
14
README.md
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue