Skip to content
This repository was archived by the owner on Jul 29, 2024. It is now read-only.

Commit 288dfeb

Browse files
Marketionistsjelin
authored andcommitted
docs(element): fix docs for $$ (#3814)
* Added .DS_Store to .gitignore * Fixed example for 325
1 parent bc15f1c commit 288dfeb

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ xmloutput*
1313
npm-debug.log
1414
.idea/
1515

16+
*.DS_Store
1617
*.swp
1718

Diff for: lib/element.ts

+6-2
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,15 @@ export class ElementArrayFinder extends WebdriverWebElement {
366366
* </div>
367367
*
368368
* @example
369-
* // The following protractor expressions are equivalent.
369+
* // The following two blocks of code are equivalent.
370370
* let list = element.all(by.css('.count span'));
371371
* expect(list.count()).toBe(2);
372+
* expect(list.get(0).getText()).toBe('First');
373+
* expect(list.get(1).getText()).toBe('Second');
374+
*
375+
* // Or using the shortcut $$() notation instead of element.all(by.css()):
372376
*
373-
* list = $$('.count span');
377+
* let list = $$('.count span');
374378
* expect(list.count()).toBe(2);
375379
* expect(list.get(0).getText()).toBe('First');
376380
* expect(list.get(1).getText()).toBe('Second');

0 commit comments

Comments
 (0)