Skip to content

Commit cf9ef7d

Browse files
committed
add commands for protocol actions
1 parent e254fe0 commit cf9ef7d

File tree

2 files changed

+84
-14
lines changed

2 files changed

+84
-14
lines changed

README.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,20 @@
7171

7272
## Protocol Element Commands
7373

74-
:x: **elementIdAttribute**(webElementId, attributeName, callback)\
75-
:x: **elementIdCssProperty**(webElementId, cssPropertyName, callback)\
76-
:x: **elementIdClear**(webElementId, optionalCallback)\
77-
:x: **elementIdClick**(webElementId, optionalCallback)\
78-
:x: **elementIdDisplayed**(webElementId, callback)\
79-
:x: **elementIdEnabled**(webElementId, callback)\
80-
:x: **elementIdLocationInView**(webElementId, optionalCallback)\
81-
:x: **elementIdLocation**(webElementId, callback)\
82-
:x: **elementIdName**(webElementId, callback)\
83-
:x: **elementIdSelected**(webElementId, callback)\
84-
:x: **elementIdSize**(webElementId, callback)\
85-
:x: **elementIdText**(webElementId, callback)\
86-
:x: **elementIdValue**(webElementId, optionalValue, callback)\
87-
:x: **submit**(webElementId, optionalCallback)
74+
:heavy_check_mark: **elementIdAttribute**(webElementId, attributeName, callback)\
75+
:heavy_check_mark: **elementIdCssProperty**(webElementId, cssPropertyName, callback)\
76+
:heavy_check_mark: **elementIdClear**(webElementId, optionalCallback)\
77+
:heavy_check_mark: **elementIdClick**(webElementId, optionalCallback)\
78+
:heavy_check_mark: **elementIdDisplayed**(webElementId, callback)\
79+
:heavy_check_mark: **elementIdEnabled**(webElementId, callback)\
80+
:heavy_check_mark: **elementIdLocationInView**(webElementId, optionalCallback)\
81+
:heavy_check_mark: **elementIdLocation**(webElementId, callback)\
82+
:heavy_check_mark: **elementIdName**(webElementId, callback)\
83+
:heavy_check_mark: **elementIdSelected**(webElementId, callback)\
84+
:heavy_check_mark: **elementIdSize**(webElementId, callback)\
85+
:heavy_check_mark: **elementIdText**(webElementId, callback)\
86+
:heavy_check_mark: **elementIdValue**(webElementId, optionalValue, callback)\
87+
:heavy_check_mark: **submit**(webElementId, optionalCallback)
8888

8989
## Document Handling
9090

snippets/nightwatchsnippets.json

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,76 @@
204204
"body": "getLocationInView(${1:selector}, ${2:callback})",
205205
"description": "Determine an element's location on the screen once it has been scrolled into view"
206206
},
207+
"elementIdAttribute": {
208+
"prefix": "nwelementIdAttribute",
209+
"body": "elementIdAttribute(${1:webElementId}, ${2:attributeName}, ${3:callback})",
210+
"description": "Get the value of an element's attribute"
211+
},
212+
"elementIdCssProperty": {
213+
"prefix": "nwelementIdCssProperty",
214+
"body": "elementIdCssProperty(${1:webElementId}, ${2:cssPropertyName}, ${3:callback})",
215+
"description": "Retrieve the computed value of the given CSS property of the given element"
216+
},
217+
"elementIdClear": {
218+
"prefix": "nwelementIdClear",
219+
"body": "elementIdClear(${1:webElementId}, ${2:optionalCallback})",
220+
"description": "Attempts to clear its value, reset the checked state, or text content"
221+
},
222+
"elementIdClick": {
223+
"prefix": "nwelementIdClick",
224+
"body": "elementIdClick(${1:webElementId}, ${2:optionalCallback})",
225+
"description": "Scrolls into view the element and clicks the in-view center point"
226+
},
227+
"elementIdDisplayed": {
228+
"prefix": "nwelementIdDisplayed",
229+
"body": "elementIdDisplayed(${1:webElementId}, ${2:callback})",
230+
"description": "Determine if an element is currently displayed"
231+
},
232+
"elementIdEnabled": {
233+
"prefix": "nwelementIdEnabled",
234+
"body": "elementIdEnabled(${1:webElementId}, ${2:callback})",
235+
"description": "Determine if an element is currently enabled"
236+
},
237+
"elementIdLocationInView": {
238+
"prefix": "nwelementIdLocationInView",
239+
"body": "elementIdLocationInView(${1:webElementId}, ${2:optionalCallback})",
240+
"description": "Determine an element's location on the screen once it has been scrolled into view"
241+
},
242+
"elementIdLocation": {
243+
"prefix": "nwelementIdLocation",
244+
"body": "elementIdLocation(${1:webElementId}, ${2:callback})",
245+
"description": "Determine an element's location on the page"
246+
},
247+
"elementIdName": {
248+
"prefix": "nwelementIdName",
249+
"body": "elementIdName(${1:webElementId}, ${2:callback})",
250+
"description": "Retrieve the qualified tag name of the given element"
251+
},
252+
"elementIdSelected": {
253+
"prefix": "nwelementIdSelected",
254+
"body": "elementIdSelected(${1:webElementId}, ${2:callback})",
255+
"description": "Determine if an OPTION element, or an INPUT element of type checkbox or radio button is currently selected"
256+
},
257+
"elementIdSize": {
258+
"prefix": "nwelementIdSize",
259+
"body": "elementIdSize(${1:webElementId}, ${2:callback})",
260+
"description": "Determine an element's size in pixels"
261+
},
262+
"elementIdText": {
263+
"prefix": "nwelementIdText",
264+
"body": "elementIdText(${1:webElementId}, ${2:callback})",
265+
"description": "Returns the visible text for the element"
266+
},
267+
"elementIdValue": {
268+
"prefix": "nwelementIdValue",
269+
"body": "elementIdValue(${1:webElementId}, ${2:optionalValue}, ${3:callback})",
270+
"description": "sends the provided keys to the element, or returns the current value of the element"
271+
},
272+
"submit": {
273+
"prefix": "nwsubmit",
274+
"body": "submit(${1:webElementId}, ${2:optionalCallback})",
275+
"description": "Submit a FORM element"
276+
},
207277
"end": {
208278
"prefix": "nwend",
209279
"body": "end(${1:optionalCallback})",

0 commit comments

Comments
 (0)