You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+60Lines changed: 60 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -219,15 +219,36 @@ You can use sub-tasks, `commands` and `scenarios` to structure your code and exe
219
219
220
220
One of the instructions has to be present in every command. These properties are evaluated (and their effect is executed) in the order, in which they are listed below:
221
221
222
+
* setViewport
222
223
* url
223
224
* go
224
225
* clearValue
225
226
* setValue
226
227
* addValue
228
+
* selectOptionByIndex
229
+
* selectOptionByValue
227
230
* moveCursor
228
231
* click
229
232
* keys
230
233
* wait
234
+
* hasAttribute
235
+
* hasClass
236
+
* hasValue
237
+
* hasText
238
+
* hasInnerHtml
239
+
* hasOuterHtml
240
+
* isEnabled
241
+
* isExisting
242
+
* isFocused
243
+
* isSelected
244
+
* isVisible
245
+
* isVisibleWithinViewport
246
+
* isNotEnabled
247
+
* isNotExisting
248
+
* isNotFocused
249
+
* isNotSelected
250
+
* isNotVisible
251
+
* isNotVisibleWithinViewport
231
252
* file
232
253
233
254
#### url
@@ -313,6 +334,44 @@ Appends to the current value of an input element. The object should contain the
313
334
}
314
335
```
315
336
337
+
#### selectOptionByIndex
338
+
Type: `Object`
339
+
340
+
Select an `option` element of a `select` element by the specified (zero-based)
341
+
index. The object should contain the following properties:
342
+
343
+
*`selector` - `String` - selector of a select element.
344
+
*`index` - `Number` - numeric (0-based integer) index of an option to select.
345
+
346
+
```js
347
+
{
348
+
url:'https://example.com',
349
+
setValue: {
350
+
selector:'select',
351
+
index:1// select second option
352
+
}
353
+
}
354
+
```
355
+
356
+
#### selectOptionByValue
357
+
Type: `Object`
358
+
359
+
Select an `option` element of a `select` element by the specified value of
360
+
the `value` attribute. The object should contain the following properties:
361
+
362
+
*`selector` - `String` - selector of a select element.
363
+
*`value` - `String` - value of the `value` attribute of an option to select.
364
+
365
+
```js
366
+
{
367
+
url:'https://example.com',
368
+
setValue: {
369
+
selector:'select',
370
+
value:'second'
371
+
}
372
+
}
373
+
```
374
+
316
375
#### moveCursor
317
376
Type: `String` | `Object`
318
377
@@ -664,6 +723,7 @@ your code using Grunt.
664
723
665
724
## Release History
666
725
726
+
* 2018-02-26 [v0.5.0] Allow checking and setting various properties
667
727
* 2018-02-22 [v0.4.0] Allow sending key strokes to the browser
668
728
* 2018-01-30 [v0.3.0] Allow specifying test commands in separate modules
669
729
* 2018-01-27 [v0.2.0] Allow saving screenshots in addition to snapshots
0 commit comments