Skip to content

Commit f203502

Browse files
committed
feat(snippets) : add remaining sessions commands
1 parent a18026a commit f203502

File tree

2 files changed

+64
-24
lines changed

2 files changed

+64
-24
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -118,14 +118,14 @@
118118
* **getLogTypes**(callback)
119119
* **getLog**(typeString, callback)
120120
* **isLogAvailable**(typeString, callback)
121-
* **session**(optionalAction, optionalSessionId, optionalCallback) - **future release**
122-
* **sessions**(callback) - **future release**
123-
* **timeouts**(type, ms, optionalCallback) - **future release**
124-
* **timeoutsAsyncScript**(ms, optionalCallback) - **future release**
125-
* **timeoutsImplicitWait**(ms, optionalCallback) - **future release**
126-
* **status**(callback) - **future release**
127-
* **sessionLog**(typeString, callback) - **future release**
128-
* **sessionLogTypes**(callback) - **future release**
121+
* **session**(optionalAction, optionalSessionId, optionalCallback)
122+
* **sessions**(callback)
123+
* **timeouts**(type, ms, optionalCallback)
124+
* **timeoutsAsyncScript**(ms, optionalCallback)
125+
* **timeoutsImplicitWait**(ms, optionalCallback)
126+
* **status**(callback)
127+
* **sessionLog**(typeString, callback)
128+
* **sessionLogTypes**(callback)
129129

130130
## Navigation
131131

snippets/nightwatchsnippets.json

Lines changed: 56 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,62 @@
297297
"end": {
298298
"prefix": "nwend",
299299
"body": "end(${1:optionalCallback})",
300-
"description": "end(optionalCallback)"
300+
"description": "Ends the session"
301+
},
302+
"getLogTypes": {
303+
"prefix": "nwgetLogTypes",
304+
"body": "getLogTypes(${1:callback})",
305+
"description": "Gets the available log types"
306+
},
307+
"getLog": {
308+
"prefix": "nwgetLog",
309+
"body": "getLog(${1:typeString}, ${2:callback})",
310+
"description": "Gets a log from Selenium"
311+
},
312+
"isLogAvailable": {
313+
"prefix": "nwisLogAvailable",
314+
"body": "isLogAvailable(${1:typeString}, ${2:callback})",
315+
"description": "Utility command to test if the log type is available"
316+
},
317+
"session": {
318+
"prefix": "nwsession",
319+
"body": "session(${1:optionalAction}, ${2:optionalSessionId}, ${3:optionalCallback})",
320+
"description": "Get info about, delete or create a new session. Defaults to the current session"
321+
},
322+
"sessions": {
323+
"prefix": "nwsessions",
324+
"body": "sessions(${1:callback})",
325+
"description": "Returns a list of the currently active sessions"
326+
},
327+
"timeouts": {
328+
"prefix": "nwtimeouts",
329+
"body": "timeouts(${1:type}, ${2:ms}, ${3:optionalCallback})",
330+
"description": "Configure the amount of time that a particular type of operation can execute for before they are aborted"
331+
},
332+
"timeoutsAsyncScript": {
333+
"prefix": "nwtimeoutsAsyncScript",
334+
"body": "timeoutsAsyncScript(${1:ms}, ${2:optionalCallback})",
335+
"description": "Set the amount of time, in milliseconds, that asynchronous scripts executed by .executeAsync are permitted to run"
336+
},
337+
"timeoutsImplicitWait": {
338+
"prefix": "nwtimeoutsImplicitWait",
339+
"body": "timeoutsImplicitWait(${1:ms}, ${2:optionalCallback})",
340+
"description": "Set the amount of time the driver should wait when searching for elements"
341+
},
342+
"status": {
343+
"prefix": "nwstatus",
344+
"body": "status(${1:callback})",
345+
"description": "Query the server's current status"
346+
},
347+
"sessionLog": {
348+
"prefix": "nwsessionLog",
349+
"body": "sessionLog(${1:typeString}, ${2:callback})",
350+
"description": "Gets the text of the log type specified"
351+
},
352+
"sessionLogTypes": {
353+
"prefix": "nwsessionLogTypes",
354+
"body": "sessionLogTypes(${1:callback})",
355+
"description": "Gets an array of strings for which log types are available"
301356
},
302357
"pause": {
303358
"prefix": "nwpause",
@@ -388,20 +443,5 @@
388443
"prefix": "nwdeleteCookies",
389444
"body": "deleteCookies(${1:optionalCallback})",
390445
"description": "deleteCookies(optionalCallback)"
391-
},
392-
"getLogTypes": {
393-
"prefix": "nwgetLogTypes",
394-
"body": "getLogTypes(${1:callback})",
395-
"description": "getLogTypes(callback)"
396-
},
397-
"getLog": {
398-
"prefix": "nwgetLog",
399-
"body": "getLog(${1:typeString}, ${2:callback})",
400-
"description": "getLog(typeString, callback)"
401-
},
402-
"isLogAvailable": {
403-
"prefix": "nwisLogAvailable",
404-
"body": "isLogAvailable(${1:typeString}, ${2:callback})",
405-
"description": "isLogAvailable(typeString, callback)"
406446
}
407447
}

0 commit comments

Comments
 (0)