நிறுத்து
பின்வரும் பிழை குறியீடுகளில் ஒன்றுடன் கோரிக்கையை நிறுத்து:
Failed
, Aborted
, TimedOut
, AccessDenied
, ConnectionClosed
,
ConnectionReset
, ConnectionRefused
, ConnectionAborted
,
ConnectionFailed
, NameNotResolved
, InternetDisconnected
,
AddressUnreachable
, BlockedByClient
, BlockedByResponse
.
பயன்பாடு
mock.abort(errorCode)
அளவுருக்கள்
பெயர் | வகை | விவரங்கள் |
---|---|---|
errorCode | ErrorCode | பதிலின் பிழை குறியீடு, பின்வருவனவற்றில் ஒன்றாக இருக்கலாம்: Failed , Aborted , TimedOut , AccessDenied , ConnectionClosed , ConnectionReset , ConnectionRefused , ConnectionAborted , ConnectionFailed , NameNotResolved , InternetDisconnected , AddressUnreachable , BlockedByClient , BlockedByResponse |
எடுத்துக்காட்டு
abort.js
it('should block Google Analytics from page', async () => {
const mock = await browser.mock('https://www.google-analytics.com/**')
mock.abort('Failed')
})