Skip to content

Commit caa1a7a

Browse files
committed
fix and add element interaction section
1 parent 960be17 commit caa1a7a

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
:heavy_check_mark: **moveToElement**(selector, xoffset, yoffset, optionalCallback)\
5252
:heavy_check_mark: **setValue**(selector, inputValue, optionalCallback)\
5353
:heavy_check_mark: **submitForm**(selector, optionalCallback)\
54-
:x: **keys**(keysToSend, optionalCallback)
54+
:heavy_check_mark: **keys**(keysToSend, optionalCallback)
5555

5656
## Element State
5757

snippets/nightwatchsnippets.json

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,13 @@
116116
},
117117
"click": {
118118
"prefix": "nwclick",
119-
"body": "click(${1:selector}, ${2:optionalCallback})",
120-
"description": "click(selector, optionalCallback)"
119+
"body": "click(${1:optionalUsing}, ${2:selector}, ${3:optionalCallback})",
120+
"description": "Simulates a click event on the given DOM element"
121121
},
122122
"clearValue": {
123123
"prefix": "nwclearValue",
124124
"body": "clearValue(${1:selector}, ${2:optionalCallback})",
125-
"description": "clearValue(selector, optionalCallback)"
125+
"description": "Clear a textarea or a text input element's value"
126126
},
127127
"getAttribute": {
128128
"prefix": "nwgetAttribute",
@@ -172,17 +172,22 @@
172172
"moveToElement": {
173173
"prefix": "nwmoveToElement",
174174
"body": "moveToElement(${1:selector}, ${2:xoffset}, ${3:yoffset}, ${4:optionalCallback})",
175-
"description": "moveToElement(selector, xoffset, yoffset, optionalCallback)"
175+
"description": "Move the mouse by an offset of the specified element"
176176
},
177177
"setValue": {
178178
"prefix": "nwsetValue",
179179
"body": "setValue(${1:selector}, ${2:inputValue}, ${3:optionalCallback})",
180-
"description": "setValue(selector, inputValue, optionalCallback)"
180+
"description": "Sends some text to an element"
181181
},
182182
"submitForm": {
183183
"prefix": "nwsubmitForm",
184184
"body": "submitForm(${1:selector}, ${2:optionalCallback})",
185-
"description": "submitForm(selector, optionalCallback)"
185+
"description": "Submit a FORM element"
186+
},
187+
"keys": {
188+
"prefix": "nwkeys",
189+
"body": "submitForm(${1:keysToSend}, ${2:optionalCallback})",
190+
"description": "Send a sequence of key strokes to the active element"
186191
},
187192
"attributeContains": {
188193
"prefix": "nwattributeContains",

0 commit comments

Comments
 (0)