When should element.all(locator).then(thenFunction) or element.all(locator) be used?
问题 In protractor, what's the difference between (source): Example 1 const allOptions = element.all(by.options('fruit for fruit in fruits')); expect(await allOptions.count()).toEqual(4); and (source): Example 2 const arr = await element.all(by.model('color')); expect(arr.length).toEqual(3); Why if I do... Example 3 let allOptions = await element.all(by.css('.mat-option-text > span')); let firstOption = allOptions.first(); ...I get this static typescript error? Property 'first' does not exist on