* Returns a method that resolves each of its given arguments * @return {function():!Promise } * @template T
(...args)
| 1587 | * @template T |
| 1588 | */ |
| 1589 | function getArrayValueFunction(...args) { |
| 1590 | let i = 0; |
| 1591 | const lastIndex = args.length - 1; |
| 1592 | return function () { |
| 1593 | const index = i++; |
| 1594 | return args[index > lastIndex ? lastIndex : index]; |
| 1595 | }; |
| 1596 | } |
| 1597 | |
| 1598 | /** |
| 1599 | * Simulate the WebDriver polling functionality to get the latest value |