-
Notifications
You must be signed in to change notification settings - Fork 3
Codeception BrowserMob Proxy extension Documentation
-
BrowserMob
- _open
- _close
- _newHar
- _newPage
- _blacklist
- _whitelist
- _basicAuth
- _headers
- _responseInterceptor
- _requestInterceptor
- _limits
- _timeouts
- _remapHosts
- _waitForTrafficToStop
- _clearDnsCache
- _rewriteUrl
- _retry
- getProxyPort
- setProxyPort
- openProxy
- closeProxy
- startHar
- addPage
- getHar
- setHeaders
- redirectUrl
- filterRequest
- filterResponse
- Full name: \Codeception\Extension\BrowserMob
- Parent class:
BrowserMob::_open( ): void
Open a new proxy using the PHPBrowserMobProxy_Client method
BrowserMob::_close( ): void
Close current proxy using the PHPBrowserMobProxy_Client method
BrowserMob::_newHar( string $label='' ): \Requests_Response
Start new HAR using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$label='' |
string |
BrowserMob::_newPage( string $label='' ): \Requests_Response
Start new HAR page using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$label='' |
string |
BrowserMob::_blacklist( string $regexp, integer $status_code ): \Requests_Response
Blacklist URLs using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$regexp |
string | |
$status_code |
integer |
BrowserMob::_whitelist( string $regexp, integer $status_code ): \Requests_Response
Whitelist URLs using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$regexp |
string | |
$status_code |
integer |
BrowserMob::_basicAuth( string $domain, array<mixed,string> $options ): \Requests_Response
Set HTTP authentication headers using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$domain |
string | |
$options |
array<mixed,string> |
BrowserMob::_headers( array<mixed,string> $options ): \Requests_Response
Override requests HTTP headers using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$options |
array<mixed,string> |
BrowserMob::_responseInterceptor( string $js ): \Requests_Response
Intercept HTTP responses using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$js |
string |
BrowserMob::_requestInterceptor( string $js ): \Requests_Response
Intercept HTTP requests using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$js |
string |
BrowserMob::_limits( array<mixed,string> $options ): \Requests_Response
Set proxy limits using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$options |
array<mixed,string> |
BrowserMob::_timeouts( array<mixed,string> $options ): \Requests_Response
Set proxy timeouts using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$options |
array<mixed,string> |
BrowserMob::_remapHosts( string $address, string $ip_address ): \Requests_Response
Map hosts to IP using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$address |
string | |
$ip_address |
string |
BrowserMob::_waitForTrafficToStop( integer $quiet_period, integer $timeout ): \Requests_Response
Wait for traffic before stopping proxy using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$quiet_period |
integer | |
$timeout |
integer |
BrowserMob::_clearDnsCache( ): \Requests_Response
Flux proxy DNS cache using the PHPBrowserMobProxy_Client method
BrowserMob::_rewriteUrl( string $match, string $replace ): \Requests_Response
Rewrite URLs using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$match |
string | |
$replace |
string |
BrowserMob::_retry( integer $retry_count ): \Requests_Response
Set proxy retries using the PHPBrowserMobProxy_Client method
Parameters:
Parameter | Type | Description |
---|---|---|
$retry_count |
integer |
Return current proxy port opened on BrowserMobProxy
BrowserMob::getProxyPort( ): integer
Return Value:
Proxy port
Set current proxy port to use on BrowserMobProxy
BrowserMob::setProxyPort( integer $port ): integer
Parameters:
Parameter | Type | Description |
---|---|---|
$port |
integer | Proxy port |
Open a new proxy on BrowserMobProxy
BrowserMob::openProxy( array<mixed,mixed>|null, $capabilities = null ): integer
Parameters:
Parameter | Type | Description |
---|---|---|
$capabilities |
array<mixed,mixed>|null | Array of capabilities. Use extension configuration if null |
Return Value:
Proxy port
See Also:
- BrowserMob::__setProxyCapabilities
Close the current proxy opened BrowserMobProxy Not supported by library chartjes/php-browsermob-proxy
BrowserMob::closeProxy( ): void
Start to capture the HTTP archive
BrowserMob::startHar( string|null $label = '' ): boolean
Parameters:
Parameter | Type | Description |
---|---|---|
$label |
string|null | Title of first HAR page |
Return Value:
Command status
Add a new page to the HTTP archive
BrowserMob::addPage( string|null $label = '' ): boolean
Parameters:
Parameter | Type | Description |
---|---|---|
$label |
string|null | Title of new HAR page |
Return Value:
Command status
Get the HTTP archive captured
BrowserMob::getHar( ): array<mixed,mixed>
Return Value:
HTTP archive
Override HTTP request headers
BrowserMob::setHeaders( array<string,string> $headers ): boolean
Parameters:
Parameter | Type | Description |
---|---|---|
$headers |
array<string,string> |
Return Value:
Command status
Rewrite URLs with regex
BrowserMob::redirectUrl( string $match, string $replace ): boolean
Parameters:
Parameter | Type | Description |
---|---|---|
$match |
string | Matching URL regular expression |
$replace |
string | Replacement URL |
Return Value:
Command status
Run Javascript against requests before sending them
BrowserMob::filterRequest( string $script ): boolean
Parameters:
Parameter | Type | Description |
---|---|---|
$script |
string | Javascript code |
Return Value:
Command status
Run Javascript against responses received
BrowserMob::filterResponse( string $script ): boolean
Parameters:
Parameter | Type | Description |
---|---|---|
$script |
string | Javascript code |
Return Value:
Command status
This document was automatically generated from source code comments on 2016-07-17 using phpDocumentor and cvuorinen/phpdoc-markdown-public