mirror of
https://github.com/thoughtbot/capybara-webkit
synced 2023-03-27 23:22:28 -04:00
Document unknown URL handler in README
[ci skip]
This commit is contained in:
parent
b5df0fa270
commit
064f8e6cbc
1 changed files with 12 additions and 0 deletions
12
README.md
12
README.md
|
@ -127,6 +127,18 @@ page.driver.cookies["alpha"]
|
||||||
page.driver.header 'Referer', 'https://www.thoughtbot.com'
|
page.driver.header 'Referer', 'https://www.thoughtbot.com'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**block_unknown_urls**: By default, capybara-webkit will warn when a request is made to a URL other than 127.0.0.1 or localhost. This option will block such unknown URLs instead.
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
page.driver.block_unknown_urls
|
||||||
|
```
|
||||||
|
|
||||||
|
**allow_url**: Allow requests to a URL. This will silence unknown URL warnings, or permit requests to a URL when `block_unknown_urls` is used. Allowed URLs are reset on `Driver#reset!`.
|
||||||
|
|
||||||
|
```ruby
|
||||||
|
page.driver.allow_url 'example.com/*.js'
|
||||||
|
```
|
||||||
|
|
||||||
Contributing
|
Contributing
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue