Skip to content

Commit 683ed45

Browse files
committed
fix and add element state commands
1 parent caa1a7a commit 683ed45

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
:heavy_check_mark: **getText**(optionalUsing, selector, callback)\
6363
:heavy_check_mark: **getValue**(selector, callback)\
6464
:heavy_check_mark: **isVisible**(selector, callback)\
65-
:x: **elementActive**(callback)
65+
:heavy_check_mark: **elementActive**(callback)
6666

6767
## Element Location
6868

snippets/nightwatchsnippets.json

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -127,17 +127,17 @@
127127
"getAttribute": {
128128
"prefix": "nwgetAttribute",
129129
"body": "getAttribute(${1:selector}, ${2:attribute}, ${3:callback})",
130-
"description": "getAttribute(selector, attribute, callback)"
130+
"description": "Retrieve the value of an attribute for a given DOM element"
131131
},
132132
"getCssProperty": {
133133
"prefix": "nwgetCssProperty",
134134
"body": "getCssProperty(${1:selector}, ${2:cssProperty}, ${3:callback})",
135-
"description": "getCssProperty(selector, cssProperty, callback)"
135+
"description": "Retrieve the value of a css property for a given DOM element"
136136
},
137137
"getElementSize": {
138138
"prefix": "nwgetElementSize",
139139
"body": "getElementSize(${1:selector}, ${2:callback})",
140-
"description": "getElementSize(selector, callback)"
140+
"description": "Determine an element's size in pixels"
141141
},
142142
"getLocation": {
143143
"prefix": "nwgetLocation",
@@ -152,22 +152,27 @@
152152
"getTagName": {
153153
"prefix": "nwgetTagName",
154154
"body": "getTagName(${1:selector}, ${2:callback})",
155-
"description": "getTagName(selector, callback)"
155+
"description": "Query for an element's tag name"
156156
},
157157
"getText": {
158158
"prefix": "nwgetText",
159-
"body": "getText(${1:selector}, ${2:callback})",
160-
"description": "getText(selector, callback)"
159+
"body": "getText(${1:optionalUsing}, ${2:selector}, ${3:callback})",
160+
"description": "Returns the visible text for the element"
161161
},
162162
"getValue": {
163163
"prefix": "nwgetValue",
164164
"body": "getValue(${1:selector}, ${2:callback})",
165-
"description": "getValue(selector, callback)"
165+
"description": "Returns a form element current value"
166166
},
167167
"isVisible": {
168168
"prefix": "nwisVisible",
169169
"body": "isVisible(${1:selector}, ${2:callback})",
170-
"description": "isVisible(selector, callback)"
170+
"description": "Determine if an element is currently displayed"
171+
},
172+
"elementActive": {
173+
"prefix": "nwelementActive",
174+
"body": "elementActive(${1:callback})",
175+
"description": "Get the element on the page that currently has focus"
171176
},
172177
"moveToElement": {
173178
"prefix": "nwmoveToElement",

0 commit comments

Comments
 (0)