@@ -542,11 +542,12 @@ if none provided clears all cookies.
542542
543543``` js
544544I .clearCookie ()
545- I .clearCookie (' test' ) // Playwright currently doesn't support clear a particular cookie name
545+ I .clearCookie (' test' )
546546```
547547
548548#### Parameters
549549
550+ - ` cookieName `   ;
550551- ` cookie ` ** [ string] [ 9 ] ?** (optional, ` null ` by default) cookie name
551552
552553### clearField
@@ -1021,7 +1022,7 @@ Get JS log from browser.
10211022
10221023``` js
10231024const logs = await I .grabBrowserLogs ()
1024- const errors = logs .map (( l ) => ({ type: l .type (), text: l .text () })).filter (( l ) => l .type === ' error' )
1025+ const errors = logs .map (l => ({ type: l .type (), text: l .text () })).filter (l => l .type === ' error' )
10251026console .log (JSON .stringify (errors))
10261027```
10271028
@@ -1499,7 +1500,7 @@ Returns **[Promise][22]<[object][6]>** response
14991500Mocks network request using [ ` browserContext.route ` ] [ 30 ] of Playwright
15001501
15011502``` js
1502- I .mockRoute (/ (. png$ )| (. jpg$ )/ , ( route ) => route .abort ())
1503+ I .mockRoute (/ (. png$ )| (. jpg$ )/ , route => route .abort ())
15031504```
15041505
15051506This method allows intercepting and mocking requests & responses. [ Learn more about it] [ 31 ]
@@ -2495,7 +2496,7 @@ I.waitForFunction(fn[, [args[, timeout]])
24952496``` js
24962497I .waitForFunction (() => window .requests == 0 )
24972498I .waitForFunction (() => window .requests == 0 , 5 ) // waits for 5 sec
2498- I .waitForFunction (( count ) => window .requests == count, [3 ], 5 ) // pass args and wait for 5 sec
2499+ I .waitForFunction (count => window .requests == count, [3 ], 5 ) // pass args and wait for 5 sec
24992500```
25002501
25012502#### Parameters
@@ -2553,7 +2554,7 @@ Waits for a network request.
25532554
25542555``` js
25552556I .waitForRequest (' http://example.com/resource' )
2556- I .waitForRequest (( request ) => request .url () === ' http://example.com' && request .method () === ' GET' )
2557+ I .waitForRequest (request => request .url () === ' http://example.com' && request .method () === ' GET' )
25572558```
25582559
25592560#### Parameters
@@ -2567,7 +2568,7 @@ Waits for a network response.
25672568
25682569``` js
25692570I .waitForResponse (' http://example.com/resource' )
2570- I .waitForResponse (( response ) => response .url () === ' https://example.com' && response .status () === 200 )
2571+ I .waitForResponse (response => response .url () === ' https://example.com' && response .status () === 200 )
25712572```
25722573
25732574#### Parameters
0 commit comments